/**
 * Created by guo on 2015/12/17.
 */


/*!
 * jQuery JavaScript Library v1.11.3
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2015-04-28T16:19Z
 */
/*!
 * Bootstrap v3.3.2 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
if (function(t, e) {
    "object" == typeof module && "object" == typeof module.exports ? module.exports = t.document ? e(t, !0) : function(t) {
        if (!t.document) throw new Error("jQuery requires a window with a document");
        return e(t)
    }: e(t)
} ("undefined" != typeof window ? window: this,
function(t, e) {
    function n(t) {
        var e = "length" in t && t.length,
        n = rt.type(t);
        return "function" === n || rt.isWindow(t) ? !1 : 1 === t.nodeType && e ? !0 : "array" === n || 0 === e || "number" == typeof e && e > 0 && e - 1 in t
    }
    function i(t, e, n) {
        if (rt.isFunction(e)) return rt.grep(t,
        function(t, i) {
            return !! e.call(t, i, t) !== n
        });
        if (e.nodeType) return rt.grep(t,
        function(t) {
            return t === e !== n
        });
        if ("string" == typeof e) {
            if (ht.test(e)) return rt.filter(e, t, n);
            e = rt.filter(e, t)
        }
        return rt.grep(t,
        function(t) {
            return rt.inArray(t, e) >= 0 !== n
        })
    }
    function r(t, e) {
        do t = t[e];
        while (t && 1 !== t.nodeType);
        return t
    }
    function o(t) {
        var e = wt[t] = {};
        return rt.each(t.match(bt) || [],
        function(t, n) {
            e[n] = !0
        }),
        e
    }
    function s() {
        ft.addEventListener ? (ft.removeEventListener("DOMContentLoaded", a, !1), t.removeEventListener("load", a, !1)) : (ft.detachEvent("onreadystatechange", a), t.detachEvent("onload", a))
    }
    function a() { (ft.addEventListener || "load" === event.type || "complete" === ft.readyState) && (s(), rt.ready())
    }
    function l(t, e, n) {
        if (void 0 === n && 1 === t.nodeType) {
            var i = "data-" + e.replace(Ct, "-$1").toLowerCase();
            if (n = t.getAttribute(i), "string" == typeof n) {
                try {
                    n = "true" === n ? !0 : "false" === n ? !1 : "null" === n ? null: +n + "" === n ? +n: Et.test(n) ? rt.parseJSON(n) : n
                } catch(r) {}
                rt.data(t, e, n)
            } else n = void 0
        }
        return n
    }
    function u(t) {
        var e;
        for (e in t) if (("data" !== e || !rt.isEmptyObject(t[e])) && "toJSON" !== e) return ! 1;
        return ! 0
    }
    function c(t, e, n, i) {
        if (rt.acceptData(t)) {
            var r, o, s = rt.expando,
            a = t.nodeType,
            l = a ? rt.cache: t,
            u = a ? t[s] : t[s] && s;
            if (u && l[u] && (i || l[u].data) || void 0 !== n || "string" != typeof e) return u || (u = a ? t[s] = X.pop() || rt.guid++:s),
            l[u] || (l[u] = a ? {}: {
                toJSON: rt.noop
            }),
            ("object" == typeof e || "function" == typeof e) && (i ? l[u] = rt.extend(l[u], e) : l[u].data = rt.extend(l[u].data, e)),
            o = l[u],
            i || (o.data || (o.data = {}), o = o.data),
            void 0 !== n && (o[rt.camelCase(e)] = n),
            "string" == typeof e ? (r = o[e], null == r && (r = o[rt.camelCase(e)])) : r = o,
            r
        }
    }
    function d(t, e, n) {
        if (rt.acceptData(t)) {
            var i, r, o = t.nodeType,
            s = o ? rt.cache: t,
            a = o ? t[rt.expando] : rt.expando;
            if (s[a]) {
                if (e && (i = n ? s[a] : s[a].data)) {
                    rt.isArray(e) ? e = e.concat(rt.map(e, rt.camelCase)) : e in i ? e = [e] : (e = rt.camelCase(e), e = e in i ? [e] : e.split(" ")),
                    r = e.length;
                    for (; r--;) delete i[e[r]];
                    if (n ? !u(i) : !rt.isEmptyObject(i)) return
                } (n || (delete s[a].data, u(s[a]))) && (o ? rt.cleanData([t], !0) : nt.deleteExpando || s != s.window ? delete s[a] : s[a] = null)
            }
        }
    }
    function h() {
        return ! 0
    }
    function p() {
        return ! 1
    }
    function f() {
        try {
            return ft.activeElement
        } catch(t) {}
    }
    function m(t) {
        var e = Ot.split("|"),
        n = t.createDocumentFragment();
        if (n.createElement) for (; e.length;) n.createElement(e.pop());
        return n
    }
    function g(t, e) {
        var n, i, r = 0,
        o = typeof t.getElementsByTagName !== Tt ? t.getElementsByTagName(e || "*") : typeof t.querySelectorAll !== Tt ? t.querySelectorAll(e || "*") : void 0;
        if (!o) for (o = [], n = t.childNodes || t; null != (i = n[r]); r++) ! e || rt.nodeName(i, e) ? o.push(i) : rt.merge(o, g(i, e));
        return void 0 === e || e && rt.nodeName(t, e) ? rt.merge([t], o) : o
    }
    function v(t) {
        Nt.test(t.type) && (t.defaultChecked = t.checked)
    }
    function y(t, e) {
        return rt.nodeName(t, "table") && rt.nodeName(11 !== e.nodeType ? e: e.firstChild, "tr") ? t.getElementsByTagName("tbody")[0] || t.appendChild(t.ownerDocument.createElement("tbody")) : t
    }
    function b(t) {
        return t.type = (null !== rt.find.attr(t, "type")) + "/" + t.type,
        t
    }
    function w(t) {
        var e = Qt.exec(t.type);
        return e ? t.type = e[1] : t.removeAttribute("type"),
        t
    }
    function x(t, e) {
        for (var n, i = 0; null != (n = t[i]); i++) rt._data(n, "globalEval", !e || rt._data(e[i], "globalEval"))
    }
    function k(t, e) {
        if (1 === e.nodeType && rt.hasData(t)) {
            var n, i, r, o = rt._data(t),
            s = rt._data(e, o),
            a = o.events;
            if (a) {
                delete s.handle,
                s.events = {};
                for (n in a) for (i = 0, r = a[n].length; r > i; i++) rt.event.add(e, n, a[n][i])
            }
            s.data && (s.data = rt.extend({},
            s.data))
        }
    }
    function T(t, e) {
        var n, i, r;
        if (1 === e.nodeType) {
            if (n = e.nodeName.toLowerCase(), !nt.noCloneEvent && e[rt.expando]) {
                r = rt._data(e);
                for (i in r.events) rt.removeEvent(e, i, r.handle);
                e.removeAttribute(rt.expando)
            }
            "script" === n && e.text !== t.text ? (b(e).text = t.text, w(e)) : "object" === n ? (e.parentNode && (e.outerHTML = t.outerHTML), nt.html5Clone && t.innerHTML && !rt.trim(e.innerHTML) && (e.innerHTML = t.innerHTML)) : "input" === n && Nt.test(t.type) ? (e.defaultChecked = e.checked = t.checked, e.value !== t.value && (e.value = t.value)) : "option" === n ? e.defaultSelected = e.selected = t.defaultSelected: ("input" === n || "textarea" === n) && (e.defaultValue = t.defaultValue)
        }
    }
    function E(e, n) {
        var i, r = rt(n.createElement(e)).appendTo(n.body),
        o = t.getDefaultComputedStyle && (i = t.getDefaultComputedStyle(r[0])) ? i.display: rt.css(r[0], "display");
        return r.detach(),
        o
    }
    function C(t) {
        var e = ft,
        n = Zt[t];
        return n || (n = E(t, e), "none" !== n && n || (Yt = (Yt || rt("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement), e = (Yt[0].contentWindow || Yt[0].contentDocument).document, e.write(), e.close(), n = E(t, e), Yt.detach()), Zt[t] = n),
        n
    }
    function $(t, e) {
        return {
            get: function() {
                var n = t();
                if (null != n) return n ? void delete this.get: (this.get = e).apply(this, arguments)
            }
        }
    }
    function _(t, e) {
        if (e in t) return e;
        for (var n = e.charAt(0).toUpperCase() + e.slice(1), i = e, r = he.length; r--;) if (e = he[r] + n, e in t) return e;
        return i
    }
    function S(t, e) {
        for (var n, i, r, o = [], s = 0, a = t.length; a > s; s++) i = t[s],
        i.style && (o[s] = rt._data(i, "olddisplay"), n = i.style.display, e ? (o[s] || "none" !== n || (i.style.display = ""), "" === i.style.display && St(i) && (o[s] = rt._data(i, "olddisplay", C(i.nodeName)))) : (r = St(i), (n && "none" !== n || !r) && rt._data(i, "olddisplay", r ? n: rt.css(i, "display"))));
        for (s = 0; a > s; s++) i = t[s],
        i.style && (e && "none" !== i.style.display && "" !== i.style.display || (i.style.display = e ? o[s] || "": "none"));
        return t
    }
    function A(t, e, n) {
        var i = le.exec(e);
        return i ? Math.max(0, i[1] - (n || 0)) + (i[2] || "px") : e
    }
    function N(t, e, n, i, r) {
        for (var o = n === (i ? "border": "content") ? 4 : "width" === e ? 1 : 0, s = 0; 4 > o; o += 2)"margin" === n && (s += rt.css(t, n + _t[o], !0, r)),
        i ? ("content" === n && (s -= rt.css(t, "padding" + _t[o], !0, r)), "margin" !== n && (s -= rt.css(t, "border" + _t[o] + "Width", !0, r))) : (s += rt.css(t, "padding" + _t[o], !0, r), "padding" !== n && (s += rt.css(t, "border" + _t[o] + "Width", !0, r)));
        return s
    }
    function D(t, e, n) {
        var i = !0,
        r = "width" === e ? t.offsetWidth: t.offsetHeight,
        o = te(t),
        s = nt.boxSizing && "border-box" === rt.css(t, "boxSizing", !1, o);
        if (0 >= r || null == r) {
            if (r = ee(t, e, o), (0 > r || null == r) && (r = t.style[e]), ie.test(r)) return r;
            i = s && (nt.boxSizingReliable() || r === t.style[e]),
            r = parseFloat(r) || 0
        }
        return r + N(t, e, n || (s ? "border": "content"), i, o) + "px"
    }
    function F(t, e, n, i, r) {
        return new F.prototype.init(t, e, n, i, r)
    }
    function L() {
        return setTimeout(function() {
            pe = void 0
        }),
        pe = rt.now()
    }
    function j(t, e) {
        var n, i = {
            height: t
        },
        r = 0;
        for (e = e ? 1 : 0; 4 > r; r += 2 - e) n = _t[r],
        i["margin" + n] = i["padding" + n] = t;
        return e && (i.opacity = i.width = t),
        i
    }
    function I(t, e, n) {
        for (var i, r = (be[e] || []).concat(be["*"]), o = 0, s = r.length; s > o; o++) if (i = r[o].call(n, e, t)) return i
    }
    function O(t, e, n) {
        var i, r, o, s, a, l, u, c, d = this,
        h = {},
        p = t.style,
        f = t.nodeType && St(t),
        m = rt._data(t, "fxshow");
        n.queue || (a = rt._queueHooks(t, "fx"), null == a.unqueued && (a.unqueued = 0, l = a.empty.fire, a.empty.fire = function() {
            a.unqueued || l()
        }), a.unqueued++, d.always(function() {
            d.always(function() {
                a.unqueued--,
                rt.queue(t, "fx").length || a.empty.fire()
            })
        })),
        1 === t.nodeType && ("height" in e || "width" in e) && (n.overflow = [p.overflow, p.overflowX, p.overflowY], u = rt.css(t, "display"), c = "none" === u ? rt._data(t, "olddisplay") || C(t.nodeName) : u, "inline" === c && "none" === rt.css(t, "float") && (nt.inlineBlockNeedsLayout && "inline" !== C(t.nodeName) ? p.zoom = 1 : p.display = "inline-block")),
        n.overflow && (p.overflow = "hidden", nt.shrinkWrapBlocks() || d.always(function() {
            p.overflow = n.overflow[0],
            p.overflowX = n.overflow[1],
            p.overflowY = n.overflow[2]
        }));
        for (i in e) if (r = e[i], me.exec(r)) {
            if (delete e[i], o = o || "toggle" === r, r === (f ? "hide": "show")) {
                if ("show" !== r || !m || void 0 === m[i]) continue;
                f = !0
            }
            h[i] = m && m[i] || rt.style(t, i)
        } else u = void 0;
        if (rt.isEmptyObject(h))"inline" === ("none" === u ? C(t.nodeName) : u) && (p.display = u);
        else {
            m ? "hidden" in m && (f = m.hidden) : m = rt._data(t, "fxshow", {}),
            o && (m.hidden = !f),
            f ? rt(t).show() : d.done(function() {
                rt(t).hide()
            }),
            d.done(function() {
                var e;
                rt._removeData(t, "fxshow");
                for (e in h) rt.style(t, e, h[e])
            });
            for (i in h) s = I(f ? m[i] : 0, i, d),
            i in m || (m[i] = s.start, f && (s.end = s.start, s.start = "width" === i || "height" === i ? 1 : 0))
        }
    }
    function R(t, e) {
        var n, i, r, o, s;
        for (n in t) if (i = rt.camelCase(n), r = e[i], o = t[n], rt.isArray(o) && (r = o[1], o = t[n] = o[0]), n !== i && (t[i] = o, delete t[n]), s = rt.cssHooks[i], s && "expand" in s) {
            o = s.expand(o),
            delete t[i];
            for (n in o) n in t || (t[n] = o[n], e[n] = r)
        } else e[i] = r
    }
    function H(t, e, n) {
        var i, r, o = 0,
        s = ye.length,
        a = rt.Deferred().always(function() {
            delete l.elem
        }),
        l = function() {
            if (r) return ! 1;
            for (var e = pe || L(), n = Math.max(0, u.startTime + u.duration - e), i = n / u.duration || 0, o = 1 - i, s = 0, l = u.tweens.length; l > s; s++) u.tweens[s].run(o);
            return a.notifyWith(t, [u, o, n]),
            1 > o && l ? n: (a.resolveWith(t, [u]), !1)
        },
        u = a.promise({
            elem: t,
            props: rt.extend({},
            e),
            opts: rt.extend(!0, {
                specialEasing: {}
            },
            n),
            originalProperties: e,
            originalOptions: n,
            startTime: pe || L(),
            duration: n.duration,
            tweens: [],
            createTween: function(e, n) {
                var i = rt.Tween(t, u.opts, e, n, u.opts.specialEasing[e] || u.opts.easing);
                return u.tweens.push(i),
                i
            },
            stop: function(e) {
                var n = 0,
                i = e ? u.tweens.length: 0;
                if (r) return this;
                for (r = !0; i > n; n++) u.tweens[n].run(1);
                return e ? a.resolveWith(t, [u, e]) : a.rejectWith(t, [u, e]),
                this
            }
        }),
        c = u.props;
        for (R(c, u.opts.specialEasing); s > o; o++) if (i = ye[o].call(u, t, c, u.opts)) return i;
        return rt.map(c, I, u),
        rt.isFunction(u.opts.start) && u.opts.start.call(t, u),
        rt.fx.timer(rt.extend(l, {
            elem: t,
            anim: u,
            queue: u.opts.queue
        })),
        u.progress(u.opts.progress).done(u.opts.done, u.opts.complete).fail(u.opts.fail).always(u.opts.always)
    }
    function P(t) {
        return function(e, n) {
            "string" != typeof e && (n = e, e = "*");
            var i, r = 0,
            o = e.toLowerCase().match(bt) || [];
            if (rt.isFunction(n)) for (; i = o[r++];)"+" === i.charAt(0) ? (i = i.slice(1) || "*", (t[i] = t[i] || []).unshift(n)) : (t[i] = t[i] || []).push(n)
        }
    }
    function q(t, e, n, i) {
        function r(a) {
            var l;
            return o[a] = !0,
            rt.each(t[a] || [],
            function(t, a) {
                var u = a(e, n, i);
                return "string" != typeof u || s || o[u] ? s ? !(l = u) : void 0 : (e.dataTypes.unshift(u), r(u), !1)
            }),
            l
        }
        var o = {},
        s = t === Ue;
        return r(e.dataTypes[0]) || !o["*"] && r("*")
    }
    function z(t, e) {
        var n, i, r = rt.ajaxSettings.flatOptions || {};
        for (i in e) void 0 !== e[i] && ((r[i] ? t: n || (n = {}))[i] = e[i]);
        return n && rt.extend(!0, t, n),
        t
    }
    function M(t, e, n) {
        for (var i, r, o, s, a = t.contents,
        l = t.dataTypes;
        "*" === l[0];) l.shift(),
        void 0 === r && (r = t.mimeType || e.getResponseHeader("Content-Type"));
        if (r) for (s in a) if (a[s] && a[s].test(r)) {
            l.unshift(s);
            break
        }
        if (l[0] in n) o = l[0];
        else {
            for (s in n) {
                if (!l[0] || t.converters[s + " " + l[0]]) {
                    o = s;
                    break
                }
                i || (i = s)
            }
            o = o || i
        }
        return o ? (o !== l[0] && l.unshift(o), n[o]) : void 0
    }
    function U(t, e, n, i) {
        var r, o, s, a, l, u = {},
        c = t.dataTypes.slice();
        if (c[1]) for (s in t.converters) u[s.toLowerCase()] = t.converters[s];
        for (o = c.shift(); o;) if (t.responseFields[o] && (n[t.responseFields[o]] = e), !l && i && t.dataFilter && (e = t.dataFilter(e, t.dataType)), l = o, o = c.shift()) if ("*" === o) o = l;
        else if ("*" !== l && l !== o) {
            if (s = u[l + " " + o] || u["* " + o], !s) for (r in u) if (a = r.split(" "), a[1] === o && (s = u[l + " " + a[0]] || u["* " + a[0]])) {
                s === !0 ? s = u[r] : u[r] !== !0 && (o = a[0], c.unshift(a[1]));
                break
            }
            if (s !== !0) if (s && t["throws"]) e = s(e);
            else try {
                e = s(e)
            } catch(d) {
                return {
                    state: "parsererror",
                    error: s ? d: "No conversion from " + l + " to " + o
                }
            }
        }
        return {
            state: "success",
            data: e
        }
    }
    function B(t, e, n, i) {
        var r;
        if (rt.isArray(e)) rt.each(e,
        function(e, r) {
            n || Qe.test(t) ? i(t, r) : B(t + "[" + ("object" == typeof r ? e: "") + "]", r, n, i)
        });
        else if (n || "object" !== rt.type(e)) i(t, e);
        else for (r in e) B(t + "[" + r + "]", e[r], n, i)
    }
    function W() {
        try {
            return new t.XMLHttpRequest
        } catch(e) {}
    }
    function V() {
        try {
            return new t.ActiveXObject("Microsoft.XMLHTTP")
        } catch(e) {}
    }
    function Q(t) {
        return rt.isWindow(t) ? t: 9 === t.nodeType ? t.defaultView || t.parentWindow: !1
    }
    var X = [],
    G = X.slice,
    J = X.concat,
    K = X.push,
    Y = X.indexOf,
    Z = {},
    tt = Z.toString,
    et = Z.hasOwnProperty,
    nt = {},
    it = "1.11.3",
    rt = function(t, e) {
        return new rt.fn.init(t, e)
    },
    ot = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
    st = /^-ms-/,
    at = /-([\da-z])/gi,
    lt = function(t, e) {
        return e.toUpperCase()
    };
    rt.fn = rt.prototype = {
        jquery: it,
        constructor: rt,
        selector: "",
        length: 0,
        toArray: function() {
            return G.call(this)
        },
        get: function(t) {
            return null != t ? 0 > t ? this[t + this.length] : this[t] : G.call(this)
        },
        pushStack: function(t) {
            var e = rt.merge(this.constructor(), t);
            return e.prevObject = this,
            e.context = this.context,
            e
        },
        each: function(t, e) {
            return rt.each(this, t, e)
        },
        map: function(t) {
            return this.pushStack(rt.map(this,
            function(e, n) {
                return t.call(e, n, e)
            }))
        },
        slice: function() {
            return this.pushStack(G.apply(this, arguments))
        },
        first: function() {
            return this.eq(0)
        },
        last: function() {
            return this.eq( - 1)
        },
        eq: function(t) {
            var e = this.length,
            n = +t + (0 > t ? e: 0);
            return this.pushStack(n >= 0 && e > n ? [this[n]] : [])
        },
        end: function() {
            return this.prevObject || this.constructor(null)
        },
        push: K,
        sort: X.sort,
        splice: X.splice
    },
    rt.extend = rt.fn.extend = function() {
        var t, e, n, i, r, o, s = arguments[0] || {},
        a = 1,
        l = arguments.length,
        u = !1;
        for ("boolean" == typeof s && (u = s, s = arguments[a] || {},
        a++), "object" == typeof s || rt.isFunction(s) || (s = {}), a === l && (s = this, a--); l > a; a++) if (null != (r = arguments[a])) for (i in r) t = s[i],
        n = r[i],
        s !== n && (u && n && (rt.isPlainObject(n) || (e = rt.isArray(n))) ? (e ? (e = !1, o = t && rt.isArray(t) ? t: []) : o = t && rt.isPlainObject(t) ? t: {},
        s[i] = rt.extend(u, o, n)) : void 0 !== n && (s[i] = n));
        return s
    },
    rt.extend({
        expando: "jQuery" + (it + Math.random()).replace(/\D/g, ""),
        isReady: !0,
        error: function(t) {
            throw new Error(t)
        },
        noop: function() {},
        isFunction: function(t) {
            return "function" === rt.type(t)
        },
        isArray: Array.isArray ||
        function(t) {
            return "array" === rt.type(t)
        },
        isWindow: function(t) {
            return null != t && t == t.window
        },
        isNumeric: function(t) {
            return ! rt.isArray(t) && t - parseFloat(t) + 1 >= 0
        },
        isEmptyObject: function(t) {
            var e;
            for (e in t) return ! 1;
            return ! 0
        },
        isPlainObject: function(t) {
            var e;
            if (!t || "object" !== rt.type(t) || t.nodeType || rt.isWindow(t)) return ! 1;
            try {
                if (t.constructor && !et.call(t, "constructor") && !et.call(t.constructor.prototype, "isPrototypeOf")) return ! 1
            } catch(n) {
                return ! 1
            }
            if (nt.ownLast) for (e in t) return et.call(t, e);
            for (e in t);
            return void 0 === e || et.call(t, e)
        },
        type: function(t) {
            return null == t ? t + "": "object" == typeof t || "function" == typeof t ? Z[tt.call(t)] || "object": typeof t
        },
        globalEval: function(e) {
            e && rt.trim(e) && (t.execScript ||
            function(e) {
                t.eval.call(t, e)
            })(e)
        },
        camelCase: function(t) {
            return t.replace(st, "ms-").replace(at, lt)
        },
        nodeName: function(t, e) {
            return t.nodeName && t.nodeName.toLowerCase() === e.toLowerCase()
        },
        each: function(t, e, i) {
            var r, o = 0,
            s = t.length,
            a = n(t);
            if (i) {
                if (a) for (; s > o && (r = e.apply(t[o], i), r !== !1); o++);
                else for (o in t) if (r = e.apply(t[o], i), r === !1) break
            } else if (a) for (; s > o && (r = e.call(t[o], o, t[o]), r !== !1); o++);
            else for (o in t) if (r = e.call(t[o], o, t[o]), r === !1) break;
            return t
        },
        trim: function(t) {
            return null == t ? "": (t + "").replace(ot, "")
        },
        makeArray: function(t, e) {
            var i = e || [];
            return null != t && (n(Object(t)) ? rt.merge(i, "string" == typeof t ? [t] : t) : K.call(i, t)),
            i
        },
        inArray: function(t, e, n) {
            var i;
            if (e) {
                if (Y) return Y.call(e, t, n);
                for (i = e.length, n = n ? 0 > n ? Math.max(0, i + n) : n: 0; i > n; n++) if (n in e && e[n] === t) return n
            }
            return - 1
        },
        merge: function(t, e) {
            for (var n = +e.length,
            i = 0,
            r = t.length; n > i;) t[r++] = e[i++];
            if (n !== n) for (; void 0 !== e[i];) t[r++] = e[i++];
            return t.length = r,
            t
        },
        grep: function(t, e, n) {
            for (var i, r = [], o = 0, s = t.length, a = !n; s > o; o++) i = !e(t[o], o),
            i !== a && r.push(t[o]);
            return r
        },
        map: function(t, e, i) {
            var r, o = 0,
            s = t.length,
            a = n(t),
            l = [];
            if (a) for (; s > o; o++) r = e(t[o], o, i),
            null != r && l.push(r);
            else for (o in t) r = e(t[o], o, i),
            null != r && l.push(r);
            return J.apply([], l)
        },
        guid: 1,
        proxy: function(t, e) {
            var n, i, r;
            return "string" == typeof e && (r = t[e], e = t, t = r),
            rt.isFunction(t) ? (n = G.call(arguments, 2), i = function() {
                return t.apply(e || this, n.concat(G.call(arguments)))
            },
            i.guid = t.guid = t.guid || rt.guid++, i) : void 0
        },
        now: function() {
            return + new Date
        },
        support: nt
    }),
    rt.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),
    function(t, e) {
        Z["[object " + e + "]"] = e.toLowerCase()
    });
    var ut =
    /*!
 * Sizzle CSS Selector Engine v2.2.0-pre
 * http://sizzlejs.com/
 *
 * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2014-12-16
 */
    function(t) {
        function e(t, e, n, i) {
            var r, o, s, a, l, u, d, p, f, m;
            if ((e ? e.ownerDocument || e: q) !== F && D(e), e = e || F, n = n || [], a = e.nodeType, "string" != typeof t || !t || 1 !== a && 9 !== a && 11 !== a) return n;
            if (!i && j) {
                if (11 !== a && (r = yt.exec(t))) if (s = r[1]) {
                    if (9 === a) {
                        if (o = e.getElementById(s), !o || !o.parentNode) return n;
                        if (o.id === s) return n.push(o),
                        n
                    } else if (e.ownerDocument && (o = e.ownerDocument.getElementById(s)) && H(e, o) && o.id === s) return n.push(o),
                    n
                } else {
                    if (r[2]) return Y.apply(n, e.getElementsByTagName(t)),
                    n;
                    if ((s = r[3]) && x.getElementsByClassName) return Y.apply(n, e.getElementsByClassName(s)),
                    n
                }
                if (x.qsa && (!I || !I.test(t))) {
                    if (p = d = P, f = e, m = 1 !== a && t, 1 === a && "object" !== e.nodeName.toLowerCase()) {
                        for (u = C(t), (d = e.getAttribute("id")) ? p = d.replace(wt, "\\$&") : e.setAttribute("id", p), p = "[id='" + p + "'] ", l = u.length; l--;) u[l] = p + h(u[l]);
                        f = bt.test(t) && c(e.parentNode) || e,
                        m = u.join(",")
                    }
                    if (m) try {
                        return Y.apply(n, f.querySelectorAll(m)),
                        n
                    } catch(g) {} finally {
                        d || e.removeAttribute("id")
                    }
                }
            }
            return _(t.replace(lt, "$1"), e, n, i)
        }
        function n() {
            function t(n, i) {
                return e.push(n + " ") > k.cacheLength && delete t[e.shift()],
                t[n + " "] = i
            }
            var e = [];
            return t
        }
        function i(t) {
            return t[P] = !0,
            t
        }
        function r(t) {
            var e = F.createElement("div");
            try {
                return !! t(e)
            } catch(n) {
                return ! 1
            } finally {
                e.parentNode && e.parentNode.removeChild(e),
                e = null
            }
        }
        function o(t, e) {
            for (var n = t.split("|"), i = t.length; i--;) k.attrHandle[n[i]] = e
        }
        function s(t, e) {
            var n = e && t,
            i = n && 1 === t.nodeType && 1 === e.nodeType && (~e.sourceIndex || Q) - (~t.sourceIndex || Q);
            if (i) return i;
            if (n) for (; n = n.nextSibling;) if (n === e) return - 1;
            return t ? 1 : -1
        }
        function a(t) {
            return function(e) {
                var n = e.nodeName.toLowerCase();
                return "input" === n && e.type === t
            }
        }
        function l(t) {
            return function(e) {
                var n = e.nodeName.toLowerCase();
                return ("input" === n || "button" === n) && e.type === t
            }
        }
        function u(t) {
            return i(function(e) {
                return e = +e,
                i(function(n, i) {
                    for (var r, o = t([], n.length, e), s = o.length; s--;) n[r = o[s]] && (n[r] = !(i[r] = n[r]))
                })
            })
        }
        function c(t) {
            return t && "undefined" != typeof t.getElementsByTagName && t
        }
        function d() {}
        function h(t) {
            for (var e = 0,
            n = t.length,
            i = ""; n > e; e++) i += t[e].value;
            return i
        }
        function p(t, e, n) {
            var i = e.dir,
            r = n && "parentNode" === i,
            o = M++;
            return e.first ?
            function(e, n, o) {
                for (; e = e[i];) if (1 === e.nodeType || r) return t(e, n, o)
            }: function(e, n, s) {
                var a, l, u = [z, o];
                if (s) {
                    for (; e = e[i];) if ((1 === e.nodeType || r) && t(e, n, s)) return ! 0
                } else for (; e = e[i];) if (1 === e.nodeType || r) {
                    if (l = e[P] || (e[P] = {}), (a = l[i]) && a[0] === z && a[1] === o) return u[2] = a[2];
                    if (l[i] = u, u[2] = t(e, n, s)) return ! 0
                }
            }
        }
        function f(t) {
            return t.length > 1 ?
            function(e, n, i) {
                for (var r = t.length; r--;) if (!t[r](e, n, i)) return ! 1;
                return ! 0
            }: t[0]
        }
        function m(t, n, i) {
            for (var r = 0,
            o = n.length; o > r; r++) e(t, n[r], i);
            return i
        }
        function g(t, e, n, i, r) {
            for (var o, s = [], a = 0, l = t.length, u = null != e; l > a; a++)(o = t[a]) && (!n || n(o, i, r)) && (s.push(o), u && e.push(a));
            return s
        }
        function v(t, e, n, r, o, s) {
            return r && !r[P] && (r = v(r)),
            o && !o[P] && (o = v(o, s)),
            i(function(i, s, a, l) {
                var u, c, d, h = [],
                p = [],
                f = s.length,
                v = i || m(e || "*", a.nodeType ? [a] : a, []),
                y = !t || !i && e ? v: g(v, h, t, a, l),
                b = n ? o || (i ? t: f || r) ? [] : s: y;
                if (n && n(y, b, a, l), r) for (u = g(b, p), r(u, [], a, l), c = u.length; c--;)(d = u[c]) && (b[p[c]] = !(y[p[c]] = d));
                if (i) {
                    if (o || t) {
                        if (o) {
                            for (u = [], c = b.length; c--;)(d = b[c]) && u.push(y[c] = d);
                            o(null, b = [], u, l)
                        }
                        for (c = b.length; c--;)(d = b[c]) && (u = o ? tt(i, d) : h[c]) > -1 && (i[u] = !(s[u] = d))
                    }
                } else b = g(b === s ? b.splice(f, b.length) : b),
                o ? o(null, s, b, l) : Y.apply(s, b)
            })
        }
        function y(t) {
            for (var e, n, i, r = t.length,
            o = k.relative[t[0].type], s = o || k.relative[" "], a = o ? 1 : 0, l = p(function(t) {
                return t === e
            },
            s, !0), u = p(function(t) {
                return tt(e, t) > -1
            },
            s, !0), c = [function(t, n, i) {
                var r = !o && (i || n !== S) || ((e = n).nodeType ? l(t, n, i) : u(t, n, i));
                return e = null,
                r
            }]; r > a; a++) if (n = k.relative[t[a].type]) c = [p(f(c), n)];
            else {
                if (n = k.filter[t[a].type].apply(null, t[a].matches), n[P]) {
                    for (i = ++a; r > i && !k.relative[t[i].type]; i++);
                    return v(a > 1 && f(c), a > 1 && h(t.slice(0, a - 1).concat({
                        value: " " === t[a - 2].type ? "*": ""
                    })).replace(lt, "$1"), n, i > a && y(t.slice(a, i)), r > i && y(t = t.slice(i)), r > i && h(t))
                }
                c.push(n)
            }
            return f(c)
        }
        function b(t, n) {
            var r = n.length > 0,
            o = t.length > 0,
            s = function(i, s, a, l, u) {
                var c, d, h, p = 0,
                f = "0",
                m = i && [],
                v = [],
                y = S,
                b = i || o && k.find.TAG("*", u),
                w = z += null == y ? 1 : Math.random() || .1,
                x = b.length;
                for (u && (S = s !== F && s); f !== x && null != (c = b[f]); f++) {
                    if (o && c) {
                        for (d = 0; h = t[d++];) if (h(c, s, a)) {
                            l.push(c);
                            break
                        }
                        u && (z = w)
                    }
                    r && ((c = !h && c) && p--, i && m.push(c))
                }
                if (p += f, r && f !== p) {
                    for (d = 0; h = n[d++];) h(m, v, s, a);
                    if (i) {
                        if (p > 0) for (; f--;) m[f] || v[f] || (v[f] = J.call(l));
                        v = g(v)
                    }
                    Y.apply(l, v),
                    u && !i && v.length > 0 && p + n.length > 1 && e.uniqueSort(l)
                }
                return u && (z = w, S = y),
                m
            };
            return r ? i(s) : s
        }
        var w, x, k, T, E, C, $, _, S, A, N, D, F, L, j, I, O, R, H, P = "sizzle" + 1 * new Date,
        q = t.document,
        z = 0,
        M = 0,
        U = n(),
        B = n(),
        W = n(),
        V = function(t, e) {
            return t === e && (N = !0),
            0
        },
        Q = 1 << 31,
        X = {}.hasOwnProperty,
        G = [],
        J = G.pop,
        K = G.push,
        Y = G.push,
        Z = G.slice,
        tt = function(t, e) {
            for (var n = 0,
            i = t.length; i > n; n++) if (t[n] === e) return n;
            return - 1
        },
        et = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
        nt = "[\\x20\\t\\r\\n\\f]",
        it = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
        rt = it.replace("w", "w#"),
        ot = "\\[" + nt + "*(" + it + ")(?:" + nt + "*([*^$|!~]?=)" + nt + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + rt + "))|)" + nt + "*\\]",
        st = ":(" + it + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + ot + ")*)|.*)\\)|)",
        at = new RegExp(nt + "+", "g"),
        lt = new RegExp("^" + nt + "+|((?:^|[^\\\\])(?:\\\\.)*)" + nt + "+$", "g"),
        ut = new RegExp("^" + nt + "*," + nt + "*"),
        ct = new RegExp("^" + nt + "*([>+~]|" + nt + ")" + nt + "*"),
        dt = new RegExp("=" + nt + "*([^\\]'\"]*?)" + nt + "*\\]", "g"),
        ht = new RegExp(st),
        pt = new RegExp("^" + rt + "$"),
        ft = {
            ID: new RegExp("^#(" + it + ")"),
            CLASS: new RegExp("^\\.(" + it + ")"),
            TAG: new RegExp("^(" + it.replace("w", "w*") + ")"),
            ATTR: new RegExp("^" + ot),
            PSEUDO: new RegExp("^" + st),
            CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + nt + "*(even|odd|(([+-]|)(\\d*)n|)" + nt + "*(?:([+-]|)" + nt + "*(\\d+)|))" + nt + "*\\)|)", "i"),
            bool: new RegExp("^(?:" + et + ")$", "i"),
            needsContext: new RegExp("^" + nt + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + nt + "*((?:-\\d)?\\d*)" + nt + "*\\)|)(?=[^-]|$)", "i")
        },
        mt = /^(?:input|select|textarea|button)$/i,
        gt = /^h\d$/i,
        vt = /^[^{]+\{\s*\[native \w/,
        yt = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
        bt = /[+~]/,
        wt = /'|\\/g,
        xt = new RegExp("\\\\([\\da-f]{1,6}" + nt + "?|(" + nt + ")|.)", "ig"),
        kt = function(t, e, n) {
            var i = "0x" + e - 65536;
            return i !== i || n ? e: 0 > i ? String.fromCharCode(i + 65536) : String.fromCharCode(i >> 10 | 55296, 1023 & i | 56320)
        },
        Tt = function() {
            D()
        };
        try {
            Y.apply(G = Z.call(q.childNodes), q.childNodes),
            G[q.childNodes.length].nodeType
        } catch(Et) {
            Y = {
                apply: G.length ?
                function(t, e) {
                    K.apply(t, Z.call(e))
                }: function(t, e) {
                    for (var n = t.length,
                    i = 0; t[n++] = e[i++];);
                    t.length = n - 1
                }
            }
        }
        x = e.support = {},
        E = e.isXML = function(t) {
            var e = t && (t.ownerDocument || t).documentElement;
            return e ? "HTML" !== e.nodeName: !1
        },
        D = e.setDocument = function(t) {
            var e, n, i = t ? t.ownerDocument || t: q;
            return i !== F && 9 === i.nodeType && i.documentElement ? (F = i, L = i.documentElement, n = i.defaultView, n && n !== n.top && (n.addEventListener ? n.addEventListener("unload", Tt, !1) : n.attachEvent && n.attachEvent("onunload", Tt)), j = !E(i), x.attributes = r(function(t) {
                return t.className = "i",
                !t.getAttribute("className")
            }), x.getElementsByTagName = r(function(t) {
                return t.appendChild(i.createComment("")),
                !t.getElementsByTagName("*").length
            }), x.getElementsByClassName = vt.test(i.getElementsByClassName), x.getById = r(function(t) {
                return L.appendChild(t).id = P,
                !i.getElementsByName || !i.getElementsByName(P).length
            }), x.getById ? (k.find.ID = function(t, e) {
                if ("undefined" != typeof e.getElementById && j) {
                    var n = e.getElementById(t);
                    return n && n.parentNode ? [n] : []
                }
            },
            k.filter.ID = function(t) {
                var e = t.replace(xt, kt);
                return function(t) {
                    return t.getAttribute("id") === e
                }
            }) : (delete k.find.ID, k.filter.ID = function(t) {
                var e = t.replace(xt, kt);
                return function(t) {
                    var n = "undefined" != typeof t.getAttributeNode && t.getAttributeNode("id");
                    return n && n.value === e
                }
            }), k.find.TAG = x.getElementsByTagName ?
            function(t, e) {
                return "undefined" != typeof e.getElementsByTagName ? e.getElementsByTagName(t) : x.qsa ? e.querySelectorAll(t) : void 0
            }: function(t, e) {
                var n, i = [],
                r = 0,
                o = e.getElementsByTagName(t);
                if ("*" === t) {
                    for (; n = o[r++];) 1 === n.nodeType && i.push(n);
                    return i
                }
                return o
            },
            k.find.CLASS = x.getElementsByClassName &&
            function(t, e) {
                return j ? e.getElementsByClassName(t) : void 0
            },
            O = [], I = [], (x.qsa = vt.test(i.querySelectorAll)) && (r(function(t) {
                L.appendChild(t).innerHTML = "<a id='" + P + "'></a><select id='" + P + "-\f]' msallowcapture=''><option selected=''></option></select>",
                t.querySelectorAll("[msallowcapture^='']").length && I.push("[*^$]=" + nt + "*(?:''|\"\")"),
                t.querySelectorAll("[selected]").length || I.push("\\[" + nt + "*(?:value|" + et + ")"),
                t.querySelectorAll("[id~=" + P + "-]").length || I.push("~="),
                t.querySelectorAll(":checked").length || I.push(":checked"),
                t.querySelectorAll("a#" + P + "+*").length || I.push(".#.+[+~]")
            }), r(function(t) {
                var e = i.createElement("input");
                e.setAttribute("type", "hidden"),
                t.appendChild(e).setAttribute("name", "D"),
                t.querySelectorAll("[name=d]").length && I.push("name" + nt + "*[*^$|!~]?="),
                t.querySelectorAll(":enabled").length || I.push(":enabled", ":disabled"),
                t.querySelectorAll("*,:x"),
                I.push(",.*:")
            })), (x.matchesSelector = vt.test(R = L.matches || L.webkitMatchesSelector || L.mozMatchesSelector || L.oMatchesSelector || L.msMatchesSelector)) && r(function(t) {
                x.disconnectedMatch = R.call(t, "div"),
                R.call(t, "[s!='']:x"),
                O.push("!=", st)
            }), I = I.length && new RegExp(I.join("|")), O = O.length && new RegExp(O.join("|")), e = vt.test(L.compareDocumentPosition), H = e || vt.test(L.contains) ?
            function(t, e) {
                var n = 9 === t.nodeType ? t.documentElement: t,
                i = e && e.parentNode;
                return t === i || !(!i || 1 !== i.nodeType || !(n.contains ? n.contains(i) : t.compareDocumentPosition && 16 & t.compareDocumentPosition(i)))
            }: function(t, e) {
                if (e) for (; e = e.parentNode;) if (e === t) return ! 0;
                return ! 1
            },
            V = e ?
            function(t, e) {
                if (t === e) return N = !0,
                0;
                var n = !t.compareDocumentPosition - !e.compareDocumentPosition;
                return n ? n: (n = (t.ownerDocument || t) === (e.ownerDocument || e) ? t.compareDocumentPosition(e) : 1, 1 & n || !x.sortDetached && e.compareDocumentPosition(t) === n ? t === i || t.ownerDocument === q && H(q, t) ? -1 : e === i || e.ownerDocument === q && H(q, e) ? 1 : A ? tt(A, t) - tt(A, e) : 0 : 4 & n ? -1 : 1)
            }: function(t, e) {
                if (t === e) return N = !0,
                0;
                var n, r = 0,
                o = t.parentNode,
                a = e.parentNode,
                l = [t],
                u = [e];
                if (!o || !a) return t === i ? -1 : e === i ? 1 : o ? -1 : a ? 1 : A ? tt(A, t) - tt(A, e) : 0;
                if (o === a) return s(t, e);
                for (n = t; n = n.parentNode;) l.unshift(n);
                for (n = e; n = n.parentNode;) u.unshift(n);
                for (; l[r] === u[r];) r++;
                return r ? s(l[r], u[r]) : l[r] === q ? -1 : u[r] === q ? 1 : 0
            },
            i) : F
        },
        e.matches = function(t, n) {
            return e(t, null, null, n)
        },
        e.matchesSelector = function(t, n) {
            if ((t.ownerDocument || t) !== F && D(t), n = n.replace(dt, "='$1']"), x.matchesSelector && j && (!O || !O.test(n)) && (!I || !I.test(n))) try {
                var i = R.call(t, n);
                if (i || x.disconnectedMatch || t.document && 11 !== t.document.nodeType) return i
            } catch(r) {}
            return e(n, F, null, [t]).length > 0
        },
        e.contains = function(t, e) {
            return (t.ownerDocument || t) !== F && D(t),
            H(t, e)
        },
        e.attr = function(t, e) { (t.ownerDocument || t) !== F && D(t);
            var n = k.attrHandle[e.toLowerCase()],
            i = n && X.call(k.attrHandle, e.toLowerCase()) ? n(t, e, !j) : void 0;
            return void 0 !== i ? i: x.attributes || !j ? t.getAttribute(e) : (i = t.getAttributeNode(e)) && i.specified ? i.value: null
        },
        e.error = function(t) {
            throw new Error("Syntax error, unrecognized expression: " + t)
        },
        e.uniqueSort = function(t) {
            var e, n = [],
            i = 0,
            r = 0;
            if (N = !x.detectDuplicates, A = !x.sortStable && t.slice(0), t.sort(V), N) {
                for (; e = t[r++];) e === t[r] && (i = n.push(r));
                for (; i--;) t.splice(n[i], 1)
            }
            return A = null,
            t
        },
        T = e.getText = function(t) {
            var e, n = "",
            i = 0,
            r = t.nodeType;
            if (r) {
                if (1 === r || 9 === r || 11 === r) {
                    if ("string" == typeof t.textContent) return t.textContent;
                    for (t = t.firstChild; t; t = t.nextSibling) n += T(t)
                } else if (3 === r || 4 === r) return t.nodeValue
            } else for (; e = t[i++];) n += T(e);
            return n
        },
        k = e.selectors = {
            cacheLength: 50,
            createPseudo: i,
            match: ft,
            attrHandle: {},
            find: {},
            relative: {
                ">": {
                    dir: "parentNode",
                    first: !0
                },
                " ": {
                    dir: "parentNode"
                },
                "+": {
                    dir: "previousSibling",
                    first: !0
                },
                "~": {
                    dir: "previousSibling"
                }
            },
            preFilter: {
                ATTR: function(t) {
                    return t[1] = t[1].replace(xt, kt),
                    t[3] = (t[3] || t[4] || t[5] || "").replace(xt, kt),
                    "~=" === t[2] && (t[3] = " " + t[3] + " "),
                    t.slice(0, 4)
                },
                CHILD: function(t) {
                    return t[1] = t[1].toLowerCase(),
                    "nth" === t[1].slice(0, 3) ? (t[3] || e.error(t[0]), t[4] = +(t[4] ? t[5] + (t[6] || 1) : 2 * ("even" === t[3] || "odd" === t[3])), t[5] = +(t[7] + t[8] || "odd" === t[3])) : t[3] && e.error(t[0]),
                    t
                },
                PSEUDO: function(t) {
                    var e, n = !t[6] && t[2];
                    return ft.CHILD.test(t[0]) ? null: (t[3] ? t[2] = t[4] || t[5] || "": n && ht.test(n) && (e = C(n, !0)) && (e = n.indexOf(")", n.length - e) - n.length) && (t[0] = t[0].slice(0, e), t[2] = n.slice(0, e)), t.slice(0, 3))
                }
            },
            filter: {
                TAG: function(t) {
                    var e = t.replace(xt, kt).toLowerCase();
                    return "*" === t ?
                    function() {
                        return ! 0
                    }: function(t) {
                        return t.nodeName && t.nodeName.toLowerCase() === e
                    }
                },
                CLASS: function(t) {
                    var e = U[t + " "];
                    return e || (e = new RegExp("(^|" + nt + ")" + t + "(" + nt + "|$)")) && U(t,
                    function(t) {
                        return e.test("string" == typeof t.className && t.className || "undefined" != typeof t.getAttribute && t.getAttribute("class") || "")
                    })
                },
                ATTR: function(t, n, i) {
                    return function(r) {
                        var o = e.attr(r, t);
                        return null == o ? "!=" === n: n ? (o += "", "=" === n ? o === i: "!=" === n ? o !== i: "^=" === n ? i && 0 === o.indexOf(i) : "*=" === n ? i && o.indexOf(i) > -1 : "$=" === n ? i && o.slice( - i.length) === i: "~=" === n ? (" " + o.replace(at, " ") + " ").indexOf(i) > -1 : "|=" === n ? o === i || o.slice(0, i.length + 1) === i + "-": !1) : !0
                    }
                },
                CHILD: function(t, e, n, i, r) {
                    var o = "nth" !== t.slice(0, 3),
                    s = "last" !== t.slice( - 4),
                    a = "of-type" === e;
                    return 1 === i && 0 === r ?
                    function(t) {
                        return !! t.parentNode
                    }: function(e, n, l) {
                        var u, c, d, h, p, f, m = o !== s ? "nextSibling": "previousSibling",
                        g = e.parentNode,
                        v = a && e.nodeName.toLowerCase(),
                        y = !l && !a;
                        if (g) {
                            if (o) {
                                for (; m;) {
                                    for (d = e; d = d[m];) if (a ? d.nodeName.toLowerCase() === v: 1 === d.nodeType) return ! 1;
                                    f = m = "only" === t && !f && "nextSibling"
                                }
                                return ! 0
                            }
                            if (f = [s ? g.firstChild: g.lastChild], s && y) {
                                for (c = g[P] || (g[P] = {}), u = c[t] || [], p = u[0] === z && u[1], h = u[0] === z && u[2], d = p && g.childNodes[p]; d = ++p && d && d[m] || (h = p = 0) || f.pop();) if (1 === d.nodeType && ++h && d === e) {
                                    c[t] = [z, p, h];
                                    break
                                }
                            } else if (y && (u = (e[P] || (e[P] = {}))[t]) && u[0] === z) h = u[1];
                            else for (; (d = ++p && d && d[m] || (h = p = 0) || f.pop()) && ((a ? d.nodeName.toLowerCase() !== v: 1 !== d.nodeType) || !++h || (y && ((d[P] || (d[P] = {}))[t] = [z, h]), d !== e)););
                            return h -= r,
                            h === i || h % i === 0 && h / i >= 0
                        }
                    }
                },
                PSEUDO: function(t, n) {
                    var r, o = k.pseudos[t] || k.setFilters[t.toLowerCase()] || e.error("unsupported pseudo: " + t);
                    return o[P] ? o(n) : o.length > 1 ? (r = [t, t, "", n], k.setFilters.hasOwnProperty(t.toLowerCase()) ? i(function(t, e) {
                        for (var i, r = o(t, n), s = r.length; s--;) i = tt(t, r[s]),
                        t[i] = !(e[i] = r[s])
                    }) : function(t) {
                        return o(t, 0, r)
                    }) : o
                }
            },
            pseudos: {
                not: i(function(t) {
                    var e = [],
                    n = [],
                    r = $(t.replace(lt, "$1"));
                    return r[P] ? i(function(t, e, n, i) {
                        for (var o, s = r(t, null, i, []), a = t.length; a--;)(o = s[a]) && (t[a] = !(e[a] = o))
                    }) : function(t, i, o) {
                        return e[0] = t,
                        r(e, null, o, n),
                        e[0] = null,
                        !n.pop()
                    }
                }),
                has: i(function(t) {
                    return function(n) {
                        return e(t, n).length > 0
                    }
                }),
                contains: i(function(t) {
                    return t = t.replace(xt, kt),
                    function(e) {
                        return (e.textContent || e.innerText || T(e)).indexOf(t) > -1
                    }
                }),
                lang: i(function(t) {
                    return pt.test(t || "") || e.error("unsupported lang: " + t),
                    t = t.replace(xt, kt).toLowerCase(),
                    function(e) {
                        var n;
                        do
                        if (n = j ? e.lang: e.getAttribute("xml:lang") || e.getAttribute("lang")) return n = n.toLowerCase(),
                        n === t || 0 === n.indexOf(t + "-");
                        while ((e = e.parentNode) && 1 === e.nodeType);
                        return ! 1
                    }
                }),
                target: function(e) {
                    var n = t.location && t.location.hash;
                    return n && n.slice(1) === e.id
                },
                root: function(t) {
                    return t === L
                },
                focus: function(t) {
                    return t === F.activeElement && (!F.hasFocus || F.hasFocus()) && !!(t.type || t.href || ~t.tabIndex)
                },
                enabled: function(t) {
                    return t.disabled === !1
                },
                disabled: function(t) {
                    return t.disabled === !0
                },
                checked: function(t) {
                    var e = t.nodeName.toLowerCase();
                    return "input" === e && !!t.checked || "option" === e && !!t.selected
                },
                selected: function(t) {
                    return t.parentNode && t.parentNode.selectedIndex,
                    t.selected === !0
                },
                empty: function(t) {
                    for (t = t.firstChild; t; t = t.nextSibling) if (t.nodeType < 6) return ! 1;
                    return ! 0
                },
                parent: function(t) {
                    return ! k.pseudos.empty(t)
                },
                header: function(t) {
                    return gt.test(t.nodeName)
                },
                input: function(t) {
                    return mt.test(t.nodeName)
                },
                button: function(t) {
                    var e = t.nodeName.toLowerCase();
                    return "input" === e && "button" === t.type || "button" === e
                },
                text: function(t) {
                    var e;
                    return "input" === t.nodeName.toLowerCase() && "text" === t.type && (null == (e = t.getAttribute("type")) || "text" === e.toLowerCase())
                },
                first: u(function() {
                    return [0]
                }),
                last: u(function(t, e) {
                    return [e - 1]
                }),
                eq: u(function(t, e, n) {
                    return [0 > n ? n + e: n]
                }),
                even: u(function(t, e) {
                    for (var n = 0; e > n; n += 2) t.push(n);
                    return t
                }),
                odd: u(function(t, e) {
                    for (var n = 1; e > n; n += 2) t.push(n);
                    return t
                }),
                lt: u(function(t, e, n) {
                    for (var i = 0 > n ? n + e: n; --i >= 0;) t.push(i);
                    return t
                }),
                gt: u(function(t, e, n) {
                    for (var i = 0 > n ? n + e: n; ++i < e;) t.push(i);
                    return t
                })
            }
        },
        k.pseudos.nth = k.pseudos.eq;
        for (w in {
            radio: !0,
            checkbox: !0,
            file: !0,
            password: !0,
            image: !0
        }) k.pseudos[w] = a(w);
        for (w in {
            submit: !0,
            reset: !0
        }) k.pseudos[w] = l(w);
        return d.prototype = k.filters = k.pseudos,
        k.setFilters = new d,
        C = e.tokenize = function(t, n) {
            var i, r, o, s, a, l, u, c = B[t + " "];
            if (c) return n ? 0 : c.slice(0);
            for (a = t, l = [], u = k.preFilter; a;) { (!i || (r = ut.exec(a))) && (r && (a = a.slice(r[0].length) || a), l.push(o = [])),
                i = !1,
                (r = ct.exec(a)) && (i = r.shift(), o.push({
                    value: i,
                    type: r[0].replace(lt, " ")
                }), a = a.slice(i.length));
                for (s in k.filter) ! (r = ft[s].exec(a)) || u[s] && !(r = u[s](r)) || (i = r.shift(), o.push({
                    value: i,
                    type: s,
                    matches: r
                }), a = a.slice(i.length));
                if (!i) break
            }
            return n ? a.length: a ? e.error(t) : B(t, l).slice(0)
        },
        $ = e.compile = function(t, e) {
            var n, i = [],
            r = [],
            o = W[t + " "];
            if (!o) {
                for (e || (e = C(t)), n = e.length; n--;) o = y(e[n]),
                o[P] ? i.push(o) : r.push(o);
                o = W(t, b(r, i)),
                o.selector = t
            }
            return o
        },
        _ = e.select = function(t, e, n, i) {
            var r, o, s, a, l, u = "function" == typeof t && t,
            d = !i && C(t = u.selector || t);
            if (n = n || [], 1 === d.length) {
                if (o = d[0] = d[0].slice(0), o.length > 2 && "ID" === (s = o[0]).type && x.getById && 9 === e.nodeType && j && k.relative[o[1].type]) {
                    if (e = (k.find.ID(s.matches[0].replace(xt, kt), e) || [])[0], !e) return n;
                    u && (e = e.parentNode),
                    t = t.slice(o.shift().value.length)
                }
                for (r = ft.needsContext.test(t) ? 0 : o.length; r--&&(s = o[r], !k.relative[a = s.type]);) if ((l = k.find[a]) && (i = l(s.matches[0].replace(xt, kt), bt.test(o[0].type) && c(e.parentNode) || e))) {
                    if (o.splice(r, 1), t = i.length && h(o), !t) return Y.apply(n, i),
                    n;
                    break
                }
            }
            return (u || $(t, d))(i, e, !j, n, bt.test(t) && c(e.parentNode) || e),
            n
        },
        x.sortStable = P.split("").sort(V).join("") === P,
        x.detectDuplicates = !!N,
        D(),
        x.sortDetached = r(function(t) {
            return 1 & t.compareDocumentPosition(F.createElement("div"))
        }),
        r(function(t) {
            return t.innerHTML = "<a href='#'></a>",
            "#" === t.firstChild.getAttribute("href")
        }) || o("type|href|height|width",
        function(t, e, n) {
            return n ? void 0 : t.getAttribute(e, "type" === e.toLowerCase() ? 1 : 2)
        }),
        x.attributes && r(function(t) {
            return t.innerHTML = "<input/>",
            t.firstChild.setAttribute("value", ""),
            "" === t.firstChild.getAttribute("value")
        }) || o("value",
        function(t, e, n) {
            return n || "input" !== t.nodeName.toLowerCase() ? void 0 : t.defaultValue
        }),
        r(function(t) {
            return null == t.getAttribute("disabled")
        }) || o(et,
        function(t, e, n) {
            var i;
            return n ? void 0 : t[e] === !0 ? e.toLowerCase() : (i = t.getAttributeNode(e)) && i.specified ? i.value: null
        }),
        e
    } (t);
    rt.find = ut,
    rt.expr = ut.selectors,
    rt.expr[":"] = rt.expr.pseudos,
    rt.unique = ut.uniqueSort,
    rt.text = ut.getText,
    rt.isXMLDoc = ut.isXML,
    rt.contains = ut.contains;
    var ct = rt.expr.match.needsContext,
    dt = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
    ht = /^.[^:#\[\.,]*$/;
    rt.filter = function(t, e, n) {
        var i = e[0];
        return n && (t = ":not(" + t + ")"),
        1 === e.length && 1 === i.nodeType ? rt.find.matchesSelector(i, t) ? [i] : [] : rt.find.matches(t, rt.grep(e,
        function(t) {
            return 1 === t.nodeType
        }))
    },
    rt.fn.extend({
        find: function(t) {
            var e, n = [],
            i = this,
            r = i.length;
            if ("string" != typeof t) return this.pushStack(rt(t).filter(function() {
                for (e = 0; r > e; e++) if (rt.contains(i[e], this)) return ! 0
            }));
            for (e = 0; r > e; e++) rt.find(t, i[e], n);
            return n = this.pushStack(r > 1 ? rt.unique(n) : n),
            n.selector = this.selector ? this.selector + " " + t: t,
            n
        },
        filter: function(t) {
            return this.pushStack(i(this, t || [], !1))
        },
        not: function(t) {
            return this.pushStack(i(this, t || [], !0))
        },
        is: function(t) {
            return !! i(this, "string" == typeof t && ct.test(t) ? rt(t) : t || [], !1).length
        }
    });
    var pt, ft = t.document,
    mt = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
    gt = rt.fn.init = function(t, e) {
        var n, i;
        if (!t) return this;
        if ("string" == typeof t) {
            if (n = "<" === t.charAt(0) && ">" === t.charAt(t.length - 1) && t.length >= 3 ? [null, t, null] : mt.exec(t), !n || !n[1] && e) return ! e || e.jquery ? (e || pt).find(t) : this.constructor(e).find(t);
            if (n[1]) {
                if (e = e instanceof rt ? e[0] : e, rt.merge(this, rt.parseHTML(n[1], e && e.nodeType ? e.ownerDocument || e: ft, !0)), dt.test(n[1]) && rt.isPlainObject(e)) for (n in e) rt.isFunction(this[n]) ? this[n](e[n]) : this.attr(n, e[n]);
                return this
            }
            if (i = ft.getElementById(n[2]), i && i.parentNode) {
                if (i.id !== n[2]) return pt.find(t);
                this.length = 1,
                this[0] = i
            }
            return this.context = ft,
            this.selector = t,
            this
        }
        return t.nodeType ? (this.context = this[0] = t, this.length = 1, this) : rt.isFunction(t) ? "undefined" != typeof pt.ready ? pt.ready(t) : t(rt) : (void 0 !== t.selector && (this.selector = t.selector, this.context = t.context), rt.makeArray(t, this))
    };
    gt.prototype = rt.fn,
    pt = rt(ft);
    var vt = /^(?:parents|prev(?:Until|All))/,
    yt = {
        children: !0,
        contents: !0,
        next: !0,
        prev: !0
    };
    rt.extend({
        dir: function(t, e, n) {
            for (var i = [], r = t[e]; r && 9 !== r.nodeType && (void 0 === n || 1 !== r.nodeType || !rt(r).is(n));) 1 === r.nodeType && i.push(r),
            r = r[e];
            return i
        },
        sibling: function(t, e) {
            for (var n = []; t; t = t.nextSibling) 1 === t.nodeType && t !== e && n.push(t);
            return n
        }
    }),
    rt.fn.extend({
        has: function(t) {
            var e, n = rt(t, this),
            i = n.length;
            return this.filter(function() {
                for (e = 0; i > e; e++) if (rt.contains(this, n[e])) return ! 0
            })
        },
        closest: function(t, e) {
            for (var n, i = 0,
            r = this.length,
            o = [], s = ct.test(t) || "string" != typeof t ? rt(t, e || this.context) : 0; r > i; i++) for (n = this[i]; n && n !== e; n = n.parentNode) if (n.nodeType < 11 && (s ? s.index(n) > -1 : 1 === n.nodeType && rt.find.matchesSelector(n, t))) {
                o.push(n);
                break
            }
            return this.pushStack(o.length > 1 ? rt.unique(o) : o)
        },
        index: function(t) {
            return t ? "string" == typeof t ? rt.inArray(this[0], rt(t)) : rt.inArray(t.jquery ? t[0] : t, this) : this[0] && this[0].parentNode ? this.first().prevAll().length: -1
        },
        add: function(t, e) {
            return this.pushStack(rt.unique(rt.merge(this.get(), rt(t, e))))
        },
        addBack: function(t) {
            return this.add(null == t ? this.prevObject: this.prevObject.filter(t))
        }
    }),
    rt.each({
        parent: function(t) {
            var e = t.parentNode;
            return e && 11 !== e.nodeType ? e: null
        },
        parents: function(t) {
            return rt.dir(t, "parentNode")
        },
        parentsUntil: function(t, e, n) {
            return rt.dir(t, "parentNode", n)
        },
        next: function(t) {
            return r(t, "nextSibling")
        },
        prev: function(t) {
            return r(t, "previousSibling")
        },
        nextAll: function(t) {
            return rt.dir(t, "nextSibling")
        },
        prevAll: function(t) {
            return rt.dir(t, "previousSibling")
        },
        nextUntil: function(t, e, n) {
            return rt.dir(t, "nextSibling", n)
        },
        prevUntil: function(t, e, n) {
            return rt.dir(t, "previousSibling", n)
        },
        siblings: function(t) {
            return rt.sibling((t.parentNode || {}).firstChild, t)
        },
        children: function(t) {
            return rt.sibling(t.firstChild)
        },
        contents: function(t) {
            return rt.nodeName(t, "iframe") ? t.contentDocument || t.contentWindow.document: rt.merge([], t.childNodes)
        }
    },
    function(t, e) {
        rt.fn[t] = function(n, i) {
            var r = rt.map(this, e, n);
            return "Until" !== t.slice( - 5) && (i = n),
            i && "string" == typeof i && (r = rt.filter(i, r)),
            this.length > 1 && (yt[t] || (r = rt.unique(r)), vt.test(t) && (r = r.reverse())),
            this.pushStack(r)
        }
    });
    var bt = /\S+/g,
    wt = {};
    rt.Callbacks = function(t) {
        t = "string" == typeof t ? wt[t] || o(t) : rt.extend({},
        t);
        var e, n, i, r, s, a, l = [],
        u = !t.once && [],
        c = function(o) {
            for (n = t.memory && o, i = !0, s = a || 0, a = 0, r = l.length, e = !0; l && r > s; s++) if (l[s].apply(o[0], o[1]) === !1 && t.stopOnFalse) {
                n = !1;
                break
            }
            e = !1,
            l && (u ? u.length && c(u.shift()) : n ? l = [] : d.disable())
        },
        d = {
            add: function() {
                if (l) {
                    var i = l.length; !
                    function o(e) {
                        rt.each(e,
                        function(e, n) {
                            var i = rt.type(n);
                            "function" === i ? t.unique && d.has(n) || l.push(n) : n && n.length && "string" !== i && o(n)
                        })
                    } (arguments),
                    e ? r = l.length: n && (a = i, c(n))
                }
                return this
            },
            remove: function() {
                return l && rt.each(arguments,
                function(t, n) {
                    for (var i; (i = rt.inArray(n, l, i)) > -1;) l.splice(i, 1),
                    e && (r >= i && r--, s >= i && s--)
                }),
                this
            },
            has: function(t) {
                return t ? rt.inArray(t, l) > -1 : !(!l || !l.length)
            },
            empty: function() {
                return l = [],
                r = 0,
                this
            },
            disable: function() {
                return l = u = n = void 0,
                this
            },
            disabled: function() {
                return ! l
            },
            lock: function() {
                return u = void 0,
                n || d.disable(),
                this
            },
            locked: function() {
                return ! u
            },
            fireWith: function(t, n) {
                return ! l || i && !u || (n = n || [], n = [t, n.slice ? n.slice() : n], e ? u.push(n) : c(n)),
                this
            },
            fire: function() {
                return d.fireWith(this, arguments),
                this
            },
            fired: function() {
                return !! i
            }
        };
        return d
    },
    rt.extend({
        Deferred: function(t) {
            var e = [["resolve", "done", rt.Callbacks("once memory"), "resolved"], ["reject", "fail", rt.Callbacks("once memory"), "rejected"], ["notify", "progress", rt.Callbacks("memory")]],
            n = "pending",
            i = {
                state: function() {
                    return n
                },
                always: function() {
                    return r.done(arguments).fail(arguments),
                    this
                },
                then: function() {
                    var t = arguments;
                    return rt.Deferred(function(n) {
                        rt.each(e,
                        function(e, o) {
                            var s = rt.isFunction(t[e]) && t[e];
                            r[o[1]](function() {
                                var t = s && s.apply(this, arguments);
                                t && rt.isFunction(t.promise) ? t.promise().done(n.resolve).fail(n.reject).progress(n.notify) : n[o[0] + "With"](this === i ? n.promise() : this, s ? [t] : arguments)
                            })
                        }),
                        t = null
                    }).promise()
                },
                promise: function(t) {
                    return null != t ? rt.extend(t, i) : i
                }
            },
            r = {};
            return i.pipe = i.then,
            rt.each(e,
            function(t, o) {
                var s = o[2],
                a = o[3];
                i[o[1]] = s.add,
                a && s.add(function() {
                    n = a
                },
                e[1 ^ t][2].disable, e[2][2].lock),
                r[o[0]] = function() {
                    return r[o[0] + "With"](this === r ? i: this, arguments),
                    this
                },
                r[o[0] + "With"] = s.fireWith
            }),
            i.promise(r),
            t && t.call(r, r),
            r
        },
        when: function(t) {
            var e, n, i, r = 0,
            o = G.call(arguments),
            s = o.length,
            a = 1 !== s || t && rt.isFunction(t.promise) ? s: 0,
            l = 1 === a ? t: rt.Deferred(),
            u = function(t, n, i) {
                return function(r) {
                    n[t] = this,
                    i[t] = arguments.length > 1 ? G.call(arguments) : r,
                    i === e ? l.notifyWith(n, i) : --a || l.resolveWith(n, i)
                }
            };
            if (s > 1) for (e = new Array(s), n = new Array(s), i = new Array(s); s > r; r++) o[r] && rt.isFunction(o[r].promise) ? o[r].promise().done(u(r, i, o)).fail(l.reject).progress(u(r, n, e)) : --a;
            return a || l.resolveWith(i, o),
            l.promise()
        }
    });
    var xt;
    rt.fn.ready = function(t) {
        return rt.ready.promise().done(t),
        this
    },
    rt.extend({
        isReady: !1,
        readyWait: 1,
        holdReady: function(t) {
            t ? rt.readyWait++:rt.ready(!0)
        },
        ready: function(t) {
            if (t === !0 ? !--rt.readyWait: !rt.isReady) {
                if (!ft.body) return setTimeout(rt.ready);
                rt.isReady = !0,
                t !== !0 && --rt.readyWait > 0 || (xt.resolveWith(ft, [rt]), rt.fn.triggerHandler && (rt(ft).triggerHandler("ready"), rt(ft).off("ready")))
            }
        }
    }),
    rt.ready.promise = function(e) {
        if (!xt) if (xt = rt.Deferred(), "complete" === ft.readyState) setTimeout(rt.ready);
        else if (ft.addEventListener) ft.addEventListener("DOMContentLoaded", a, !1),
        t.addEventListener("load", a, !1);
        else {
            ft.attachEvent("onreadystatechange", a),
            t.attachEvent("onload", a);
            var n = !1;
            try {
                n = null == t.frameElement && ft.documentElement
            } catch(i) {}
            n && n.doScroll && !
            function r() {
                if (!rt.isReady) {
                    try {
                        n.doScroll("left")
                    } catch(t) {
                        return setTimeout(r, 50)
                    }
                    s(),
                    rt.ready()
                }
            } ()
        }
        return xt.promise(e)
    };
    var kt, Tt = "undefined";
    for (kt in rt(nt)) break;
    nt.ownLast = "0" !== kt,
    nt.inlineBlockNeedsLayout = !1,
    rt(function() {
        var t, e, n, i;
        n = ft.getElementsByTagName("body")[0],
        n && n.style && (e = ft.createElement("div"), i = ft.createElement("div"), i.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", n.appendChild(i).appendChild(e), typeof e.style.zoom !== Tt && (e.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1", nt.inlineBlockNeedsLayout = t = 3 === e.offsetWidth, t && (n.style.zoom = 1)), n.removeChild(i))
    }),
    function() {
        var t = ft.createElement("div");
        if (null == nt.deleteExpando) {
            nt.deleteExpando = !0;
            try {
                delete t.test
            } catch(e) {
                nt.deleteExpando = !1
            }
        }
        t = null
    } (),
    rt.acceptData = function(t) {
        var e = rt.noData[(t.nodeName + " ").toLowerCase()],
        n = +t.nodeType || 1;
        return 1 !== n && 9 !== n ? !1 : !e || e !== !0 && t.getAttribute("classid") === e
    };
    var Et = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
    Ct = /([A-Z])/g;
    rt.extend({
        cache: {},
        noData: {
            "applet ": !0,
            "embed ": !0,
            "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
        },
        hasData: function(t) {
            return t = t.nodeType ? rt.cache[t[rt.expando]] : t[rt.expando],
            !!t && !u(t)
        },
        data: function(t, e, n) {
            return c(t, e, n)
        },
        removeData: function(t, e) {
            return d(t, e)
        },
        _data: function(t, e, n) {
            return c(t, e, n, !0)
        },
        _removeData: function(t, e) {
            return d(t, e, !0)
        }
    }),
    rt.fn.extend({
        data: function(t, e) {
            var n, i, r, o = this[0],
            s = o && o.attributes;
            if (void 0 === t) {
                if (this.length && (r = rt.data(o), 1 === o.nodeType && !rt._data(o, "parsedAttrs"))) {
                    for (n = s.length; n--;) s[n] && (i = s[n].name, 0 === i.indexOf("data-") && (i = rt.camelCase(i.slice(5)), l(o, i, r[i])));
                    rt._data(o, "parsedAttrs", !0)
                }
                return r
            }
            return "object" == typeof t ? this.each(function() {
                rt.data(this, t)
            }) : arguments.length > 1 ? this.each(function() {
                rt.data(this, t, e)
            }) : o ? l(o, t, rt.data(o, t)) : void 0
        },
        removeData: function(t) {
            return this.each(function() {
                rt.removeData(this, t)
            })
        }
    }),
    rt.extend({
        queue: function(t, e, n) {
            var i;
            return t ? (e = (e || "fx") + "queue", i = rt._data(t, e), n && (!i || rt.isArray(n) ? i = rt._data(t, e, rt.makeArray(n)) : i.push(n)), i || []) : void 0
        },
        dequeue: function(t, e) {
            e = e || "fx";
            var n = rt.queue(t, e),
            i = n.length,
            r = n.shift(),
            o = rt._queueHooks(t, e),
            s = function() {
                rt.dequeue(t, e)
            };
            "inprogress" === r && (r = n.shift(), i--),
            r && ("fx" === e && n.unshift("inprogress"), delete o.stop, r.call(t, s, o)),
            !i && o && o.empty.fire()
        },
        _queueHooks: function(t, e) {
            var n = e + "queueHooks";
            return rt._data(t, n) || rt._data(t, n, {
                empty: rt.Callbacks("once memory").add(function() {
                    rt._removeData(t, e + "queue"),
                    rt._removeData(t, n)
                })
            })
        }
    }),
    rt.fn.extend({
        queue: function(t, e) {
            var n = 2;
            return "string" != typeof t && (e = t, t = "fx", n--),
            arguments.length < n ? rt.queue(this[0], t) : void 0 === e ? this: this.each(function() {
                var n = rt.queue(this, t, e);
                rt._queueHooks(this, t),
                "fx" === t && "inprogress" !== n[0] && rt.dequeue(this, t)
            })
        },
        dequeue: function(t) {
            return this.each(function() {
                rt.dequeue(this, t)
            })
        },
        clearQueue: function(t) {
            return this.queue(t || "fx", [])
        },
        promise: function(t, e) {
            var n, i = 1,
            r = rt.Deferred(),
            o = this,
            s = this.length,
            a = function() {--i || r.resolveWith(o, [o])
            };
            for ("string" != typeof t && (e = t, t = void 0), t = t || "fx"; s--;) n = rt._data(o[s], t + "queueHooks"),
            n && n.empty && (i++, n.empty.add(a));
            return a(),
            r.promise(e)
        }
    });
    var $t = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
    _t = ["Top", "Right", "Bottom", "Left"],
    St = function(t, e) {
        return t = e || t,
        "none" === rt.css(t, "display") || !rt.contains(t.ownerDocument, t)
    },
    At = rt.access = function(t, e, n, i, r, o, s) {
        var a = 0,
        l = t.length,
        u = null == n;
        if ("object" === rt.type(n)) {
            r = !0;
            for (a in n) rt.access(t, e, a, n[a], !0, o, s)
        } else if (void 0 !== i && (r = !0, rt.isFunction(i) || (s = !0), u && (s ? (e.call(t, i), e = null) : (u = e, e = function(t, e, n) {
            return u.call(rt(t), n)
        })), e)) for (; l > a; a++) e(t[a], n, s ? i: i.call(t[a], a, e(t[a], n)));
        return r ? t: u ? e.call(t) : l ? e(t[0], n) : o
    },
    Nt = /^(?:checkbox|radio)$/i; !
    function() {
        var t = ft.createElement("input"),
        e = ft.createElement("div"),
        n = ft.createDocumentFragment();
        if (e.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", nt.leadingWhitespace = 3 === e.firstChild.nodeType, nt.tbody = !e.getElementsByTagName("tbody").length, nt.htmlSerialize = !!e.getElementsByTagName("link").length, nt.html5Clone = "<:nav></:nav>" !== ft.createElement("nav").cloneNode(!0).outerHTML, t.type = "checkbox", t.checked = !0, n.appendChild(t), nt.appendChecked = t.checked, e.innerHTML = "<textarea>x</textarea>", nt.noCloneChecked = !!e.cloneNode(!0).lastChild.defaultValue, n.appendChild(e), e.innerHTML = "<input type='radio' checked='checked' name='t'/>", nt.checkClone = e.cloneNode(!0).cloneNode(!0).lastChild.checked, nt.noCloneEvent = !0, e.attachEvent && (e.attachEvent("onclick",
        function() {
            nt.noCloneEvent = !1
        }), e.cloneNode(!0).click()), null == nt.deleteExpando) {
            nt.deleteExpando = !0;
            try {
                delete e.test
            } catch(i) {
                nt.deleteExpando = !1
            }
        }
    } (),
    function() {
        var e, n, i = ft.createElement("div");
        for (e in {
            submit: !0,
            change: !0,
            focusin: !0
        }) n = "on" + e,
        (nt[e + "Bubbles"] = n in t) || (i.setAttribute(n, "t"), nt[e + "Bubbles"] = i.attributes[n].expando === !1);
        i = null
    } ();
    var Dt = /^(?:input|select|textarea)$/i,
    Ft = /^key/,
    Lt = /^(?:mouse|pointer|contextmenu)|click/,
    jt = /^(?:focusinfocus|focusoutblur)$/,
    It = /^([^.]*)(?:\.(.+)|)$/;
    rt.event = {
        global: {},
        add: function(t, e, n, i, r) {
            var o, s, a, l, u, c, d, h, p, f, m, g = rt._data(t);
            if (g) {
                for (n.handler && (l = n, n = l.handler, r = l.selector), n.guid || (n.guid = rt.guid++), (s = g.events) || (s = g.events = {}), (c = g.handle) || (c = g.handle = function(t) {
                    return typeof rt === Tt || t && rt.event.triggered === t.type ? void 0 : rt.event.dispatch.apply(c.elem, arguments)
                },
                c.elem = t), e = (e || "").match(bt) || [""], a = e.length; a--;) o = It.exec(e[a]) || [],
                p = m = o[1],
                f = (o[2] || "").split(".").sort(),
                p && (u = rt.event.special[p] || {},
                p = (r ? u.delegateType: u.bindType) || p, u = rt.event.special[p] || {},
                d = rt.extend({
                    type: p,
                    origType: m,
                    data: i,
                    handler: n,
                    guid: n.guid,
                    selector: r,
                    needsContext: r && rt.expr.match.needsContext.test(r),
                    namespace: f.join(".")
                },
                l), (h = s[p]) || (h = s[p] = [], h.delegateCount = 0, u.setup && u.setup.call(t, i, f, c) !== !1 || (t.addEventListener ? t.addEventListener(p, c, !1) : t.attachEvent && t.attachEvent("on" + p, c))), u.add && (u.add.call(t, d), d.handler.guid || (d.handler.guid = n.guid)), r ? h.splice(h.delegateCount++, 0, d) : h.push(d), rt.event.global[p] = !0);
                t = null
            }
        },
        remove: function(t, e, n, i, r) {
            var o, s, a, l, u, c, d, h, p, f, m, g = rt.hasData(t) && rt._data(t);
            if (g && (c = g.events)) {
                for (e = (e || "").match(bt) || [""], u = e.length; u--;) if (a = It.exec(e[u]) || [], p = m = a[1], f = (a[2] || "").split(".").sort(), p) {
                    for (d = rt.event.special[p] || {},
                    p = (i ? d.delegateType: d.bindType) || p, h = c[p] || [], a = a[2] && new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)"), l = o = h.length; o--;) s = h[o],
                    !r && m !== s.origType || n && n.guid !== s.guid || a && !a.test(s.namespace) || i && i !== s.selector && ("**" !== i || !s.selector) || (h.splice(o, 1), s.selector && h.delegateCount--, d.remove && d.remove.call(t, s));
                    l && !h.length && (d.teardown && d.teardown.call(t, f, g.handle) !== !1 || rt.removeEvent(t, p, g.handle), delete c[p])
                } else for (p in c) rt.event.remove(t, p + e[u], n, i, !0);
                rt.isEmptyObject(c) && (delete g.handle, rt._removeData(t, "events"))
            }
        },
        trigger: function(e, n, i, r) {
            var o, s, a, l, u, c, d, h = [i || ft],
            p = et.call(e, "type") ? e.type: e,
            f = et.call(e, "namespace") ? e.namespace.split(".") : [];
            if (a = c = i = i || ft, 3 !== i.nodeType && 8 !== i.nodeType && !jt.test(p + rt.event.triggered) && (p.indexOf(".") >= 0 && (f = p.split("."), p = f.shift(), f.sort()), s = p.indexOf(":") < 0 && "on" + p, e = e[rt.expando] ? e: new rt.Event(p, "object" == typeof e && e), e.isTrigger = r ? 2 : 3, e.namespace = f.join("."), e.namespace_re = e.namespace ? new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, e.result = void 0, e.target || (e.target = i), n = null == n ? [e] : rt.makeArray(n, [e]), u = rt.event.special[p] || {},
            r || !u.trigger || u.trigger.apply(i, n) !== !1)) {
                if (!r && !u.noBubble && !rt.isWindow(i)) {
                    for (l = u.delegateType || p, jt.test(l + p) || (a = a.parentNode); a; a = a.parentNode) h.push(a),
                    c = a;
                    c === (i.ownerDocument || ft) && h.push(c.defaultView || c.parentWindow || t)
                }
                for (d = 0; (a = h[d++]) && !e.isPropagationStopped();) e.type = d > 1 ? l: u.bindType || p,
                o = (rt._data(a, "events") || {})[e.type] && rt._data(a, "handle"),
                o && o.apply(a, n),
                o = s && a[s],
                o && o.apply && rt.acceptData(a) && (e.result = o.apply(a, n), e.result === !1 && e.preventDefault());
                if (e.type = p, !r && !e.isDefaultPrevented() && (!u._default || u._default.apply(h.pop(), n) === !1) && rt.acceptData(i) && s && i[p] && !rt.isWindow(i)) {
                    c = i[s],
                    c && (i[s] = null),
                    rt.event.triggered = p;
                    try {
                        i[p]()
                    } catch(m) {}
                    rt.event.triggered = void 0,
                    c && (i[s] = c)
                }
                return e.result
            }
        },
        dispatch: function(t) {
            t = rt.event.fix(t);
            var e, n, i, r, o, s = [],
            a = G.call(arguments),
            l = (rt._data(this, "events") || {})[t.type] || [],
            u = rt.event.special[t.type] || {};
            if (a[0] = t, t.delegateTarget = this, !u.preDispatch || u.preDispatch.call(this, t) !== !1) {
                for (s = rt.event.handlers.call(this, t, l), e = 0; (r = s[e++]) && !t.isPropagationStopped();) for (t.currentTarget = r.elem, o = 0; (i = r.handlers[o++]) && !t.isImmediatePropagationStopped();)(!t.namespace_re || t.namespace_re.test(i.namespace)) && (t.handleObj = i, t.data = i.data, n = ((rt.event.special[i.origType] || {}).handle || i.handler).apply(r.elem, a), void 0 !== n && (t.result = n) === !1 && (t.preventDefault(), t.stopPropagation()));
                return u.postDispatch && u.postDispatch.call(this, t),
                t.result
            }
        },
        handlers: function(t, e) {
            var n, i, r, o, s = [],
            a = e.delegateCount,
            l = t.target;
            if (a && l.nodeType && (!t.button || "click" !== t.type)) for (; l != this; l = l.parentNode || this) if (1 === l.nodeType && (l.disabled !== !0 || "click" !== t.type)) {
                for (r = [], o = 0; a > o; o++) i = e[o],
                n = i.selector + " ",
                void 0 === r[n] && (r[n] = i.needsContext ? rt(n, this).index(l) >= 0 : rt.find(n, this, null, [l]).length),
                r[n] && r.push(i);
                r.length && s.push({
                    elem: l,
                    handlers: r
                })
            }
            return a < e.length && s.push({
                elem: this,
                handlers: e.slice(a)
            }),
            s
        },
        fix: function(t) {
            if (t[rt.expando]) return t;
            var e, n, i, r = t.type,
            o = t,
            s = this.fixHooks[r];
            for (s || (this.fixHooks[r] = s = Lt.test(r) ? this.mouseHooks: Ft.test(r) ? this.keyHooks: {}), i = s.props ? this.props.concat(s.props) : this.props, t = new rt.Event(o), e = i.length; e--;) n = i[e],
            t[n] = o[n];
            return t.target || (t.target = o.srcElement || ft),
            3 === t.target.nodeType && (t.target = t.target.parentNode),
            t.metaKey = !!t.metaKey,
            s.filter ? s.filter(t, o) : t
        },
        props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
        fixHooks: {},
        keyHooks: {
            props: "char charCode key keyCode".split(" "),
            filter: function(t, e) {
                return null == t.which && (t.which = null != e.charCode ? e.charCode: e.keyCode),
                t
            }
        },
        mouseHooks: {
            props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
            filter: function(t, e) {
                var n, i, r, o = e.button,
                s = e.fromElement;
                return null == t.pageX && null != e.clientX && (i = t.target.ownerDocument || ft, r = i.documentElement, n = i.body, t.pageX = e.clientX + (r && r.scrollLeft || n && n.scrollLeft || 0) - (r && r.clientLeft || n && n.clientLeft || 0), t.pageY = e.clientY + (r && r.scrollTop || n && n.scrollTop || 0) - (r && r.clientTop || n && n.clientTop || 0)),
                !t.relatedTarget && s && (t.relatedTarget = s === t.target ? e.toElement: s),
                t.which || void 0 === o || (t.which = 1 & o ? 1 : 2 & o ? 3 : 4 & o ? 2 : 0),
                t
            }
        },
        special: {
            load: {
                noBubble: !0
            },
            focus: {
                trigger: function() {
                    if (this !== f() && this.focus) try {
                        return this.focus(),
                        !1
                    } catch(t) {}
                },
                delegateType: "focusin"
            },
            blur: {
                trigger: function() {
                    return this === f() && this.blur ? (this.blur(), !1) : void 0
                },
                delegateType: "focusout"
            },
            click: {
                trigger: function() {
                    return rt.nodeName(this, "input") && "checkbox" === this.type && this.click ? (this.click(), !1) : void 0
                },
                _default: function(t) {
                    return rt.nodeName(t.target, "a")
                }
            },
            beforeunload: {
                postDispatch: function(t) {
                    void 0 !== t.result && t.originalEvent && (t.originalEvent.returnValue = t.result)
                }
            }
        },
        simulate: function(t, e, n, i) {
            var r = rt.extend(new rt.Event, n, {
                type: t,
                isSimulated: !0,
                originalEvent: {}
            });
            i ? rt.event.trigger(r, null, e) : rt.event.dispatch.call(e, r),
            r.isDefaultPrevented() && n.preventDefault()
        }
    },
    rt.removeEvent = ft.removeEventListener ?
    function(t, e, n) {
        t.removeEventListener && t.removeEventListener(e, n, !1)
    }: function(t, e, n) {
        var i = "on" + e;
        t.detachEvent && (typeof t[i] === Tt && (t[i] = null), t.detachEvent(i, n))
    },
    rt.Event = function(t, e) {
        return this instanceof rt.Event ? (t && t.type ? (this.originalEvent = t, this.type = t.type, this.isDefaultPrevented = t.defaultPrevented || void 0 === t.defaultPrevented && t.returnValue === !1 ? h: p) : this.type = t, e && rt.extend(this, e), this.timeStamp = t && t.timeStamp || rt.now(), void(this[rt.expando] = !0)) : new rt.Event(t, e)
    },
    rt.Event.prototype = {
        isDefaultPrevented: p,
        isPropagationStopped: p,
        isImmediatePropagationStopped: p,
        preventDefault: function() {
            var t = this.originalEvent;
            this.isDefaultPrevented = h,
            t && (t.preventDefault ? t.preventDefault() : t.returnValue = !1)
        },
        stopPropagation: function() {
            var t = this.originalEvent;
            this.isPropagationStopped = h,
            t && (t.stopPropagation && t.stopPropagation(), t.cancelBubble = !0)
        },
        stopImmediatePropagation: function() {
            var t = this.originalEvent;
            this.isImmediatePropagationStopped = h,
            t && t.stopImmediatePropagation && t.stopImmediatePropagation(),
            this.stopPropagation()
        }
    },
    rt.each({
        mouseenter: "mouseover",
        mouseleave: "mouseout",
        pointerenter: "pointerover",
        pointerleave: "pointerout"
    },
    function(t, e) {
        rt.event.special[t] = {
            delegateType: e,
            bindType: e,
            handle: function(t) {
                var n, i = this,
                r = t.relatedTarget,
                o = t.handleObj;
                return (!r || r !== i && !rt.contains(i, r)) && (t.type = o.origType, n = o.handler.apply(this, arguments), t.type = e),
                n
            }
        }
    }),
    nt.submitBubbles || (rt.event.special.submit = {
        setup: function() {
            return rt.nodeName(this, "form") ? !1 : void rt.event.add(this, "click._submit keypress._submit",
            function(t) {
                var e = t.target,
                n = rt.nodeName(e, "input") || rt.nodeName(e, "button") ? e.form: void 0;
                n && !rt._data(n, "submitBubbles") && (rt.event.add(n, "submit._submit",
                function(t) {
                    t._submit_bubble = !0
                }), rt._data(n, "submitBubbles", !0))
            })
        },
        postDispatch: function(t) {
            t._submit_bubble && (delete t._submit_bubble, this.parentNode && !t.isTrigger && rt.event.simulate("submit", this.parentNode, t, !0))
        },
        teardown: function() {
            return rt.nodeName(this, "form") ? !1 : void rt.event.remove(this, "._submit")
        }
    }),
    nt.changeBubbles || (rt.event.special.change = {
        setup: function() {
            return Dt.test(this.nodeName) ? (("checkbox" === this.type || "radio" === this.type) && (rt.event.add(this, "propertychange._change",
            function(t) {
                "checked" === t.originalEvent.propertyName && (this._just_changed = !0)
            }), rt.event.add(this, "click._change",
            function(t) {
                this._just_changed && !t.isTrigger && (this._just_changed = !1),
                rt.event.simulate("change", this, t, !0)
            })), !1) : void rt.event.add(this, "beforeactivate._change",
            function(t) {
                var e = t.target;
                Dt.test(e.nodeName) && !rt._data(e, "changeBubbles") && (rt.event.add(e, "change._change",
                function(t) { ! this.parentNode || t.isSimulated || t.isTrigger || rt.event.simulate("change", this.parentNode, t, !0)
                }), rt._data(e, "changeBubbles", !0))
            })
        },
        handle: function(t) {
            var e = t.target;
            return this !== e || t.isSimulated || t.isTrigger || "radio" !== e.type && "checkbox" !== e.type ? t.handleObj.handler.apply(this, arguments) : void 0
        },
        teardown: function() {
            return rt.event.remove(this, "._change"),
            !Dt.test(this.nodeName)
        }
    }),
    nt.focusinBubbles || rt.each({
        focus: "focusin",
        blur: "focusout"
    },
    function(t, e) {
        var n = function(t) {
            rt.event.simulate(e, t.target, rt.event.fix(t), !0)
        };
        rt.event.special[e] = {
            setup: function() {
                var i = this.ownerDocument || this,
                r = rt._data(i, e);
                r || i.addEventListener(t, n, !0),
                rt._data(i, e, (r || 0) + 1)
            },
            teardown: function() {
                var i = this.ownerDocument || this,
                r = rt._data(i, e) - 1;
                r ? rt._data(i, e, r) : (i.removeEventListener(t, n, !0), rt._removeData(i, e))
            }
        }
    }),
    rt.fn.extend({
        on: function(t, e, n, i, r) {
            var o, s;
            if ("object" == typeof t) {
                "string" != typeof e && (n = n || e, e = void 0);
                for (o in t) this.on(o, e, n, t[o], r);
                return this
            }
            if (null == n && null == i ? (i = e, n = e = void 0) : null == i && ("string" == typeof e ? (i = n, n = void 0) : (i = n, n = e, e = void 0)), i === !1) i = p;
            else if (!i) return this;
            return 1 === r && (s = i, i = function(t) {
                return rt().off(t),
                s.apply(this, arguments)
            },
            i.guid = s.guid || (s.guid = rt.guid++)),
            this.each(function() {
                rt.event.add(this, t, i, n, e)
            })
        },
        one: function(t, e, n, i) {
            return this.on(t, e, n, i, 1)
        },
        off: function(t, e, n) {
            var i, r;
            if (t && t.preventDefault && t.handleObj) return i = t.handleObj,
            rt(t.delegateTarget).off(i.namespace ? i.origType + "." + i.namespace: i.origType, i.selector, i.handler),
            this;
            if ("object" == typeof t) {
                for (r in t) this.off(r, e, t[r]);
                return this
            }
            return (e === !1 || "function" == typeof e) && (n = e, e = void 0),
            n === !1 && (n = p),
            this.each(function() {
                rt.event.remove(this, t, n, e)
            })
        },
        trigger: function(t, e) {
            return this.each(function() {
                rt.event.trigger(t, e, this)
            })
        },
        triggerHandler: function(t, e) {
            var n = this[0];
            return n ? rt.event.trigger(t, e, n, !0) : void 0
        }
    });
    var Ot = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
    Rt = / jQuery\d+="(?:null|\d+)"/g,
    Ht = new RegExp("<(?:" + Ot + ")[\\s/>]", "i"),
    Pt = /^\s+/,
    qt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
    zt = /<([\w:]+)/,
    Mt = /<tbody/i,
    Ut = /<|&#?\w+;/,
    Bt = /<(?:script|style|link)/i,
    Wt = /checked\s*(?:[^=]|=\s*.checked.)/i,
    Vt = /^$|\/(?:java|ecma)script/i,
    Qt = /^true\/(.*)/,
    Xt = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
    Gt = {
        option: [1, "<select multiple='multiple'>", "</select>"],
        legend: [1, "<fieldset>", "</fieldset>"],
        area: [1, "<map>", "</map>"],
        param: [1, "<object>", "</object>"],
        thead: [1, "<table>", "</table>"],
        tr: [2, "<table><tbody>", "</tbody></table>"],
        col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
        td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
        _default: nt.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
    },
    Jt = m(ft),
    Kt = Jt.appendChild(ft.createElement("div"));
    Gt.optgroup = Gt.option,
    Gt.tbody = Gt.tfoot = Gt.colgroup = Gt.caption = Gt.thead,
    Gt.th = Gt.td,
    rt.extend({
        clone: function(t, e, n) {
            var i, r, o, s, a, l = rt.contains(t.ownerDocument, t);
            if (nt.html5Clone || rt.isXMLDoc(t) || !Ht.test("<" + t.nodeName + ">") ? o = t.cloneNode(!0) : (Kt.innerHTML = t.outerHTML, Kt.removeChild(o = Kt.firstChild)), !(nt.noCloneEvent && nt.noCloneChecked || 1 !== t.nodeType && 11 !== t.nodeType || rt.isXMLDoc(t))) for (i = g(o), a = g(t), s = 0; null != (r = a[s]); ++s) i[s] && T(r, i[s]);
            if (e) if (n) for (a = a || g(t), i = i || g(o), s = 0; null != (r = a[s]); s++) k(r, i[s]);
            else k(t, o);
            return i = g(o, "script"),
            i.length > 0 && x(i, !l && g(t, "script")),
            i = a = r = null,
            o
        },
        buildFragment: function(t, e, n, i) {
            for (var r, o, s, a, l, u, c, d = t.length,
            h = m(e), p = [], f = 0; d > f; f++) if (o = t[f], o || 0 === o) if ("object" === rt.type(o)) rt.merge(p, o.nodeType ? [o] : o);
            else if (Ut.test(o)) {
                for (a = a || h.appendChild(e.createElement("div")), l = (zt.exec(o) || ["", ""])[1].toLowerCase(), c = Gt[l] || Gt._default, a.innerHTML = c[1] + o.replace(qt, "<$1></$2>") + c[2], r = c[0]; r--;) a = a.lastChild;
                if (!nt.leadingWhitespace && Pt.test(o) && p.push(e.createTextNode(Pt.exec(o)[0])), !nt.tbody) for (o = "table" !== l || Mt.test(o) ? "<table>" !== c[1] || Mt.test(o) ? 0 : a: a.firstChild, r = o && o.childNodes.length; r--;) rt.nodeName(u = o.childNodes[r], "tbody") && !u.childNodes.length && o.removeChild(u);
                for (rt.merge(p, a.childNodes), a.textContent = ""; a.firstChild;) a.removeChild(a.firstChild);
                a = h.lastChild
            } else p.push(e.createTextNode(o));
            for (a && h.removeChild(a), nt.appendChecked || rt.grep(g(p, "input"), v), f = 0; o = p[f++];) if ((!i || -1 === rt.inArray(o, i)) && (s = rt.contains(o.ownerDocument, o), a = g(h.appendChild(o), "script"), s && x(a), n)) for (r = 0; o = a[r++];) Vt.test(o.type || "") && n.push(o);
            return a = null,
            h
        },
        cleanData: function(t, e) {
            for (var n, i, r, o, s = 0,
            a = rt.expando,
            l = rt.cache,
            u = nt.deleteExpando,
            c = rt.event.special; null != (n = t[s]); s++) if ((e || rt.acceptData(n)) && (r = n[a], o = r && l[r])) {
                if (o.events) for (i in o.events) c[i] ? rt.event.remove(n, i) : rt.removeEvent(n, i, o.handle);
                l[r] && (delete l[r], u ? delete n[a] : typeof n.removeAttribute !== Tt ? n.removeAttribute(a) : n[a] = null, X.push(r))
            }
        }
    }),
    rt.fn.extend({
        text: function(t) {
            return At(this,
            function(t) {
                return void 0 === t ? rt.text(this) : this.empty().append((this[0] && this[0].ownerDocument || ft).createTextNode(t))
            },
            null, t, arguments.length)
        },
        append: function() {
            return this.domManip(arguments,
            function(t) {
                if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
                    var e = y(this, t);
                    e.appendChild(t)
                }
            })
        },
        prepend: function() {
            return this.domManip(arguments,
            function(t) {
                if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
                    var e = y(this, t);
                    e.insertBefore(t, e.firstChild)
                }
            })
        },
        before: function() {
            return this.domManip(arguments,
            function(t) {
                this.parentNode && this.parentNode.insertBefore(t, this)
            })
        },
        after: function() {
            return this.domManip(arguments,
            function(t) {
                this.parentNode && this.parentNode.insertBefore(t, this.nextSibling)
            })
        },
        remove: function(t, e) {
            for (var n, i = t ? rt.filter(t, this) : this, r = 0; null != (n = i[r]); r++) e || 1 !== n.nodeType || rt.cleanData(g(n)),
            n.parentNode && (e && rt.contains(n.ownerDocument, n) && x(g(n, "script")), n.parentNode.removeChild(n));
            return this
        },
        empty: function() {
            for (var t, e = 0; null != (t = this[e]); e++) {
                for (1 === t.nodeType && rt.cleanData(g(t, !1)); t.firstChild;) t.removeChild(t.firstChild);
                t.options && rt.nodeName(t, "select") && (t.options.length = 0)
            }
            return this
        },
        clone: function(t, e) {
            return t = null == t ? !1 : t,
            e = null == e ? t: e,
            this.map(function() {
                return rt.clone(this, t, e)
            })
        },
        html: function(t) {
            return At(this,
            function(t) {
                var e = this[0] || {},
                n = 0,
                i = this.length;
                if (void 0 === t) return 1 === e.nodeType ? e.innerHTML.replace(Rt, "") : void 0;
                if ("string" == typeof t && !Bt.test(t) && (nt.htmlSerialize || !Ht.test(t)) && (nt.leadingWhitespace || !Pt.test(t)) && !Gt[(zt.exec(t) || ["", ""])[1].toLowerCase()]) {
                    t = t.replace(qt, "<$1></$2>");
                    try {
                        for (; i > n; n++) e = this[n] || {},
                        1 === e.nodeType && (rt.cleanData(g(e, !1)), e.innerHTML = t);
                        e = 0
                    } catch(r) {}
                }
                e && this.empty().append(t)
            },
            null, t, arguments.length)
        },
        replaceWith: function() {
            var t = arguments[0];
            return this.domManip(arguments,
            function(e) {
                t = this.parentNode,
                rt.cleanData(g(this)),
                t && t.replaceChild(e, this)
            }),
            t && (t.length || t.nodeType) ? this: this.remove()
        },
        detach: function(t) {
            return this.remove(t, !0)
        },
        domManip: function(t, e) {
            t = J.apply([], t);
            var n, i, r, o, s, a, l = 0,
            u = this.length,
            c = this,
            d = u - 1,
            h = t[0],
            p = rt.isFunction(h);
            if (p || u > 1 && "string" == typeof h && !nt.checkClone && Wt.test(h)) return this.each(function(n) {
                var i = c.eq(n);
                p && (t[0] = h.call(this, n, i.html())),
                i.domManip(t, e)
            });
            if (u && (a = rt.buildFragment(t, this[0].ownerDocument, !1, this), n = a.firstChild, 1 === a.childNodes.length && (a = n), n)) {
                for (o = rt.map(g(a, "script"), b), r = o.length; u > l; l++) i = a,
                l !== d && (i = rt.clone(i, !0, !0), r && rt.merge(o, g(i, "script"))),
                e.call(this[l], i, l);
                if (r) for (s = o[o.length - 1].ownerDocument, rt.map(o, w), l = 0; r > l; l++) i = o[l],
                Vt.test(i.type || "") && !rt._data(i, "globalEval") && rt.contains(s, i) && (i.src ? rt._evalUrl && rt._evalUrl(i.src) : rt.globalEval((i.text || i.textContent || i.innerHTML || "").replace(Xt, "")));
                a = n = null
            }
            return this
        }
    }),
    rt.each({
        appendTo: "append",
        prependTo: "prepend",
        insertBefore: "before",
        insertAfter: "after",
        replaceAll: "replaceWith"
    },
    function(t, e) {
        rt.fn[t] = function(t) {
            for (var n, i = 0,
            r = [], o = rt(t), s = o.length - 1; s >= i; i++) n = i === s ? this: this.clone(!0),
            rt(o[i])[e](n),
            K.apply(r, n.get());
            return this.pushStack(r)
        }
    });
    var Yt, Zt = {}; !
    function() {
        var t;
        nt.shrinkWrapBlocks = function() {
            if (null != t) return t;
            t = !1;
            var e, n, i;
            return n = ft.getElementsByTagName("body")[0],
            n && n.style ? (e = ft.createElement("div"), i = ft.createElement("div"), i.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", n.appendChild(i).appendChild(e), typeof e.style.zoom !== Tt && (e.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1", e.appendChild(ft.createElement("div")).style.width = "5px", t = 3 !== e.offsetWidth), n.removeChild(i), t) : void 0
        }
    } ();
    var te, ee, ne = /^margin/,
    ie = new RegExp("^(" + $t + ")(?!px)[a-z%]+$", "i"),
    re = /^(top|right|bottom|left)$/;
    t.getComputedStyle ? (te = function(e) {
        return e.ownerDocument.defaultView.opener ? e.ownerDocument.defaultView.getComputedStyle(e, null) : t.getComputedStyle(e, null)
    },
    ee = function(t, e, n) {
        var i, r, o, s, a = t.style;
        return n = n || te(t),
        s = n ? n.getPropertyValue(e) || n[e] : void 0,
        n && ("" !== s || rt.contains(t.ownerDocument, t) || (s = rt.style(t, e)), ie.test(s) && ne.test(e) && (i = a.width, r = a.minWidth, o = a.maxWidth, a.minWidth = a.maxWidth = a.width = s, s = n.width, a.width = i, a.minWidth = r, a.maxWidth = o)),
        void 0 === s ? s: s + ""
    }) : ft.documentElement.currentStyle && (te = function(t) {
        return t.currentStyle
    },
    ee = function(t, e, n) {
        var i, r, o, s, a = t.style;
        return n = n || te(t),
        s = n ? n[e] : void 0,
        null == s && a && a[e] && (s = a[e]),
        ie.test(s) && !re.test(e) && (i = a.left, r = t.runtimeStyle, o = r && r.left, o && (r.left = t.currentStyle.left), a.left = "fontSize" === e ? "1em": s, s = a.pixelLeft + "px", a.left = i, o && (r.left = o)),
        void 0 === s ? s: s + "" || "auto"
    }),
    function() {
        function e() {
            var e, n, i, r;
            n = ft.getElementsByTagName("body")[0],
            n && n.style && (e = ft.createElement("div"), i = ft.createElement("div"), i.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", n.appendChild(i).appendChild(e), e.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute", o = s = !1, l = !0, t.getComputedStyle && (o = "1%" !== (t.getComputedStyle(e, null) || {}).top, s = "4px" === (t.getComputedStyle(e, null) || {
                width: "4px"
            }).width, r = e.appendChild(ft.createElement("div")), r.style.cssText = e.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0", r.style.marginRight = r.style.width = "0", e.style.width = "1px", l = !parseFloat((t.getComputedStyle(r, null) || {}).marginRight), e.removeChild(r)), e.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", r = e.getElementsByTagName("td"), r[0].style.cssText = "margin:0;border:0;padding:0;display:none", a = 0 === r[0].offsetHeight, a && (r[0].style.display = "", r[1].style.display = "none", a = 0 === r[0].offsetHeight), n.removeChild(i))
        }
        var n, i, r, o, s, a, l;
        n = ft.createElement("div"),
        n.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",
        r = n.getElementsByTagName("a")[0],
        i = r && r.style,
        i && (i.cssText = "float:left;opacity:.5", nt.opacity = "0.5" === i.opacity, nt.cssFloat = !!i.cssFloat, n.style.backgroundClip = "content-box", n.cloneNode(!0).style.backgroundClip = "", nt.clearCloneStyle = "content-box" === n.style.backgroundClip, nt.boxSizing = "" === i.boxSizing || "" === i.MozBoxSizing || "" === i.WebkitBoxSizing, rt.extend(nt, {
            reliableHiddenOffsets: function() {
                return null == a && e(),
                a
            },
            boxSizingReliable: function() {
                return null == s && e(),
                s
            },
            pixelPosition: function() {
                return null == o && e(),
                o
            },
            reliableMarginRight: function() {
                return null == l && e(),
                l
            }
        }))
    } (),
    rt.swap = function(t, e, n, i) {
        var r, o, s = {};
        for (o in e) s[o] = t.style[o],
        t.style[o] = e[o];
        r = n.apply(t, i || []);
        for (o in e) t.style[o] = s[o];
        return r
    };
    var oe = /alpha\([^)]*\)/i,
    se = /opacity\s*=\s*([^)]*)/,
    ae = /^(none|table(?!-c[ea]).+)/,
    le = new RegExp("^(" + $t + ")(.*)$", "i"),
    ue = new RegExp("^([+-])=(" + $t + ")", "i"),
    ce = {
        position: "absolute",
        visibility: "hidden",
        display: "block"
    },
    de = {
        letterSpacing: "0",
        fontWeight: "400"
    },
    he = ["Webkit", "O", "Moz", "ms"];
    rt.extend({
        cssHooks: {
            opacity: {
                get: function(t, e) {
                    if (e) {
                        var n = ee(t, "opacity");
                        return "" === n ? "1": n
                    }
                }
            }
        },
        cssNumber: {
            columnCount: !0,
            fillOpacity: !0,
            flexGrow: !0,
            flexShrink: !0,
            fontWeight: !0,
            lineHeight: !0,
            opacity: !0,
            order: !0,
            orphans: !0,
            widows: !0,
            zIndex: !0,
            zoom: !0
        },
        cssProps: {
            "float": nt.cssFloat ? "cssFloat": "styleFloat"
        },
        style: function(t, e, n, i) {
            if (t && 3 !== t.nodeType && 8 !== t.nodeType && t.style) {
                var r, o, s, a = rt.camelCase(e),
                l = t.style;
                if (e = rt.cssProps[a] || (rt.cssProps[a] = _(l, a)), s = rt.cssHooks[e] || rt.cssHooks[a], void 0 === n) return s && "get" in s && void 0 !== (r = s.get(t, !1, i)) ? r: l[e];
                if (o = typeof n, "string" === o && (r = ue.exec(n)) && (n = (r[1] + 1) * r[2] + parseFloat(rt.css(t, e)), o = "number"), null != n && n === n && ("number" !== o || rt.cssNumber[a] || (n += "px"), nt.clearCloneStyle || "" !== n || 0 !== e.indexOf("background") || (l[e] = "inherit"), !(s && "set" in s && void 0 === (n = s.set(t, n, i))))) try {
                    l[e] = n
                } catch(u) {}
            }
        },
        css: function(t, e, n, i) {
            var r, o, s, a = rt.camelCase(e);
            return e = rt.cssProps[a] || (rt.cssProps[a] = _(t.style, a)),
            s = rt.cssHooks[e] || rt.cssHooks[a],
            s && "get" in s && (o = s.get(t, !0, n)),
            void 0 === o && (o = ee(t, e, i)),
            "normal" === o && e in de && (o = de[e]),
            "" === n || n ? (r = parseFloat(o), n === !0 || rt.isNumeric(r) ? r || 0 : o) : o
        }
    }),
    rt.each(["height", "width"],
    function(t, e) {
        rt.cssHooks[e] = {
            get: function(t, n, i) {
                return n ? ae.test(rt.css(t, "display")) && 0 === t.offsetWidth ? rt.swap(t, ce,
                function() {
                    return D(t, e, i)
                }) : D(t, e, i) : void 0
            },
            set: function(t, n, i) {
                var r = i && te(t);
                return A(t, n, i ? N(t, e, i, nt.boxSizing && "border-box" === rt.css(t, "boxSizing", !1, r), r) : 0)
            }
        }
    }),
    nt.opacity || (rt.cssHooks.opacity = {
        get: function(t, e) {
            return se.test((e && t.currentStyle ? t.currentStyle.filter: t.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "": e ? "1": ""
        },
        set: function(t, e) {
            var n = t.style,
            i = t.currentStyle,
            r = rt.isNumeric(e) ? "alpha(opacity=" + 100 * e + ")": "",
            o = i && i.filter || n.filter || "";
            n.zoom = 1,
            (e >= 1 || "" === e) && "" === rt.trim(o.replace(oe, "")) && n.removeAttribute && (n.removeAttribute("filter"), "" === e || i && !i.filter) || (n.filter = oe.test(o) ? o.replace(oe, r) : o + " " + r)
        }
    }),
    rt.cssHooks.marginRight = $(nt.reliableMarginRight,
    function(t, e) {
        return e ? rt.swap(t, {
            display: "inline-block"
        },
        ee, [t, "marginRight"]) : void 0
    }),
    rt.each({
        margin: "",
        padding: "",
        border: "Width"
    },
    function(t, e) {
        rt.cssHooks[t + e] = {
            expand: function(n) {
                for (var i = 0,
                r = {},
                o = "string" == typeof n ? n.split(" ") : [n]; 4 > i; i++) r[t + _t[i] + e] = o[i] || o[i - 2] || o[0];
                return r
            }
        },
        ne.test(t) || (rt.cssHooks[t + e].set = A)
    }),
    rt.fn.extend({
        css: function(t, e) {
            return At(this,
            function(t, e, n) {
                var i, r, o = {},
                s = 0;
                if (rt.isArray(e)) {
                    for (i = te(t), r = e.length; r > s; s++) o[e[s]] = rt.css(t, e[s], !1, i);
                    return o
                }
                return void 0 !== n ? rt.style(t, e, n) : rt.css(t, e)
            },
            t, e, arguments.length > 1)
        },
        show: function() {
            return S(this, !0)
        },
        hide: function() {
            return S(this)
        },
        toggle: function(t) {
            return "boolean" == typeof t ? t ? this.show() : this.hide() : this.each(function() {
                St(this) ? rt(this).show() : rt(this).hide()
            })
        }
    }),
    rt.Tween = F,
    F.prototype = {
        constructor: F,
        init: function(t, e, n, i, r, o) {
            this.elem = t,
            this.prop = n,
            this.easing = r || "swing",
            this.options = e,
            this.start = this.now = this.cur(),
            this.end = i,
            this.unit = o || (rt.cssNumber[n] ? "": "px")
        },
        cur: function() {
            var t = F.propHooks[this.prop];
            return t && t.get ? t.get(this) : F.propHooks._default.get(this)
        },
        run: function(t) {
            var e, n = F.propHooks[this.prop];
            return this.options.duration ? this.pos = e = rt.easing[this.easing](t, this.options.duration * t, 0, 1, this.options.duration) : this.pos = e = t,
            this.now = (this.end - this.start) * e + this.start,
            this.options.step && this.options.step.call(this.elem, this.now, this),
            n && n.set ? n.set(this) : F.propHooks._default.set(this),
            this
        }
    },
    F.prototype.init.prototype = F.prototype,
    F.propHooks = {
        _default: {
            get: function(t) {
                var e;
                return null == t.elem[t.prop] || t.elem.style && null != t.elem.style[t.prop] ? (e = rt.css(t.elem, t.prop, ""), e && "auto" !== e ? e: 0) : t.elem[t.prop]
            },
            set: function(t) {
                rt.fx.step[t.prop] ? rt.fx.step[t.prop](t) : t.elem.style && (null != t.elem.style[rt.cssProps[t.prop]] || rt.cssHooks[t.prop]) ? rt.style(t.elem, t.prop, t.now + t.unit) : t.elem[t.prop] = t.now
            }
        }
    },
    F.propHooks.scrollTop = F.propHooks.scrollLeft = {
        set: function(t) {
            t.elem.nodeType && t.elem.parentNode && (t.elem[t.prop] = t.now)
        }
    },
    rt.easing = {
        linear: function(t) {
            return t
        },
        swing: function(t) {
            return.5 - Math.cos(t * Math.PI) / 2
        }
    },
    rt.fx = F.prototype.init,
    rt.fx.step = {};
    var pe, fe, me = /^(?:toggle|show|hide)$/,
    ge = new RegExp("^(?:([+-])=|)(" + $t + ")([a-z%]*)$", "i"),
    ve = /queueHooks$/,
    ye = [O],
    be = {
        "*": [function(t, e) {
            var n = this.createTween(t, e),
            i = n.cur(),
            r = ge.exec(e),
            o = r && r[3] || (rt.cssNumber[t] ? "": "px"),
            s = (rt.cssNumber[t] || "px" !== o && +i) && ge.exec(rt.css(n.elem, t)),
            a = 1,
            l = 20;
            if (s && s[3] !== o) {
                o = o || s[3],
                r = r || [],
                s = +i || 1;
                do a = a || ".5",
                s /= a,
                rt.style(n.elem, t, s + o);
                while (a !== (a = n.cur() / i) && 1 !== a && --l)
            }
            return r && (s = n.start = +s || +i || 0, n.unit = o, n.end = r[1] ? s + (r[1] + 1) * r[2] : +r[2]),
            n
        }]
    };
    rt.Animation = rt.extend(H, {
        tweener: function(t, e) {
            rt.isFunction(t) ? (e = t, t = ["*"]) : t = t.split(" ");
            for (var n, i = 0,
            r = t.length; r > i; i++) n = t[i],
            be[n] = be[n] || [],
            be[n].unshift(e)
        },
        prefilter: function(t, e) {
            e ? ye.unshift(t) : ye.push(t)
        }
    }),
    rt.speed = function(t, e, n) {
        var i = t && "object" == typeof t ? rt.extend({},
        t) : {
            complete: n || !n && e || rt.isFunction(t) && t,
            duration: t,
            easing: n && e || e && !rt.isFunction(e) && e
        };
        return i.duration = rt.fx.off ? 0 : "number" == typeof i.duration ? i.duration: i.duration in rt.fx.speeds ? rt.fx.speeds[i.duration] : rt.fx.speeds._default,
        (null == i.queue || i.queue === !0) && (i.queue = "fx"),
        i.old = i.complete,
        i.complete = function() {
            rt.isFunction(i.old) && i.old.call(this),
            i.queue && rt.dequeue(this, i.queue)
        },
        i
    },
    rt.fn.extend({
        fadeTo: function(t, e, n, i) {
            return this.filter(St).css("opacity", 0).show().end().animate({
                opacity: e
            },
            t, n, i)
        },
        animate: function(t, e, n, i) {
            var r = rt.isEmptyObject(t),
            o = rt.speed(e, n, i),
            s = function() {
                var e = H(this, rt.extend({},
                t), o); (r || rt._data(this, "finish")) && e.stop(!0)
            };
            return s.finish = s,
            r || o.queue === !1 ? this.each(s) : this.queue(o.queue, s)
        },
        stop: function(t, e, n) {
            var i = function(t) {
                var e = t.stop;
                delete t.stop,
                e(n)
            };
            return "string" != typeof t && (n = e, e = t, t = void 0),
            e && t !== !1 && this.queue(t || "fx", []),
            this.each(function() {
                var e = !0,
                r = null != t && t + "queueHooks",
                o = rt.timers,
                s = rt._data(this);
                if (r) s[r] && s[r].stop && i(s[r]);
                else for (r in s) s[r] && s[r].stop && ve.test(r) && i(s[r]);
                for (r = o.length; r--;) o[r].elem !== this || null != t && o[r].queue !== t || (o[r].anim.stop(n), e = !1, o.splice(r, 1)); (e || !n) && rt.dequeue(this, t)
            })
        },
        finish: function(t) {
            return t !== !1 && (t = t || "fx"),
            this.each(function() {
                var e, n = rt._data(this),
                i = n[t + "queue"],
                r = n[t + "queueHooks"],
                o = rt.timers,
                s = i ? i.length: 0;
                for (n.finish = !0, rt.queue(this, t, []), r && r.stop && r.stop.call(this, !0), e = o.length; e--;) o[e].elem === this && o[e].queue === t && (o[e].anim.stop(!0), o.splice(e, 1));
                for (e = 0; s > e; e++) i[e] && i[e].finish && i[e].finish.call(this);
                delete n.finish
            })
        }
    }),
    rt.each(["toggle", "show", "hide"],
    function(t, e) {
        var n = rt.fn[e];
        rt.fn[e] = function(t, i, r) {
            return null == t || "boolean" == typeof t ? n.apply(this, arguments) : this.animate(j(e, !0), t, i, r)
        }
    }),
    rt.each({
        slideDown: j("show"),
        slideUp: j("hide"),
        slideToggle: j("toggle"),
        fadeIn: {
            opacity: "show"
        },
        fadeOut: {
            opacity: "hide"
        },
        fadeToggle: {
            opacity: "toggle"
        }
    },
    function(t, e) {
        rt.fn[t] = function(t, n, i) {
            return this.animate(e, t, n, i)
        }
    }),
    rt.timers = [],
    rt.fx.tick = function() {
        var t, e = rt.timers,
        n = 0;
        for (pe = rt.now(); n < e.length; n++) t = e[n],
        t() || e[n] !== t || e.splice(n--, 1);
        e.length || rt.fx.stop(),
        pe = void 0
    },
    rt.fx.timer = function(t) {
        rt.timers.push(t),
        t() ? rt.fx.start() : rt.timers.pop()
    },
    rt.fx.interval = 13,
    rt.fx.start = function() {
        fe || (fe = setInterval(rt.fx.tick, rt.fx.interval))
    },
    rt.fx.stop = function() {
        clearInterval(fe),
        fe = null
    },
    rt.fx.speeds = {
        slow: 600,
        fast: 200,
        _default: 400
    },
    rt.fn.delay = function(t, e) {
        return t = rt.fx ? rt.fx.speeds[t] || t: t,
        e = e || "fx",
        this.queue(e,
        function(e, n) {
            var i = setTimeout(e, t);
            n.stop = function() {
                clearTimeout(i)
            }
        })
    },
    function() {
        var t, e, n, i, r;
        e = ft.createElement("div"),
        e.setAttribute("className", "t"),
        e.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",
        i = e.getElementsByTagName("a")[0],
        n = ft.createElement("select"),
        r = n.appendChild(ft.createElement("option")),
        t = e.getElementsByTagName("input")[0],
        i.style.cssText = "top:1px",
        nt.getSetAttribute = "t" !== e.className,
        nt.style = /top/.test(i.getAttribute("style")),
        nt.hrefNormalized = "/a" === i.getAttribute("href"),
        nt.checkOn = !!t.value,
        nt.optSelected = r.selected,
        nt.enctype = !!ft.createElement("form").enctype,
        n.disabled = !0,
        nt.optDisabled = !r.disabled,
        t = ft.createElement("input"),
        t.setAttribute("value", ""),
        nt.input = "" === t.getAttribute("value"),
        t.value = "t",
        t.setAttribute("type", "radio"),
        nt.radioValue = "t" === t.value
    } ();
    var we = /\r/g;
    rt.fn.extend({
        val: function(t) {
            var e, n, i, r = this[0]; {
                if (arguments.length) return i = rt.isFunction(t),
                this.each(function(n) {
                    var r;
                    1 === this.nodeType && (r = i ? t.call(this, n, rt(this).val()) : t, null == r ? r = "": "number" == typeof r ? r += "": rt.isArray(r) && (r = rt.map(r,
                    function(t) {
                        return null == t ? "": t + ""
                    })), e = rt.valHooks[this.type] || rt.valHooks[this.nodeName.toLowerCase()], e && "set" in e && void 0 !== e.set(this, r, "value") || (this.value = r))
                });
                if (r) return e = rt.valHooks[r.type] || rt.valHooks[r.nodeName.toLowerCase()],
                e && "get" in e && void 0 !== (n = e.get(r, "value")) ? n: (n = r.value, "string" == typeof n ? n.replace(we, "") : null == n ? "": n)
            }
        }
    }),
    rt.extend({
        valHooks: {
            option: {
                get: function(t) {
                    var e = rt.find.attr(t, "value");
                    return null != e ? e: rt.trim(rt.text(t))
                }
            },
            select: {
                get: function(t) {
                    for (var e, n, i = t.options,
                    r = t.selectedIndex,
                    o = "select-one" === t.type || 0 > r,
                    s = o ? null: [], a = o ? r + 1 : i.length, l = 0 > r ? a: o ? r: 0; a > l; l++) if (n = i[l], (n.selected || l === r) && (nt.optDisabled ? !n.disabled: null === n.getAttribute("disabled")) && (!n.parentNode.disabled || !rt.nodeName(n.parentNode, "optgroup"))) {
                        if (e = rt(n).val(), o) return e;
                        s.push(e)
                    }
                    return s
                },
                set: function(t, e) {
                    for (var n, i, r = t.options,
                    o = rt.makeArray(e), s = r.length; s--;) if (i = r[s], rt.inArray(rt.valHooks.option.get(i), o) >= 0) try {
                        i.selected = n = !0
                    } catch(a) {
                        i.scrollHeight
                    } else i.selected = !1;
                    return n || (t.selectedIndex = -1),
                    r
                }
            }
        }
    }),
    rt.each(["radio", "checkbox"],
    function() {
        rt.valHooks[this] = {
            set: function(t, e) {
                return rt.isArray(e) ? t.checked = rt.inArray(rt(t).val(), e) >= 0 : void 0
            }
        },
        nt.checkOn || (rt.valHooks[this].get = function(t) {
            return null === t.getAttribute("value") ? "on": t.value
        })
    });
    var xe, ke, Te = rt.expr.attrHandle,
    Ee = /^(?:checked|selected)$/i,
    Ce = nt.getSetAttribute,
    $e = nt.input;
    rt.fn.extend({
        attr: function(t, e) {
            return At(this, rt.attr, t, e, arguments.length > 1)
        },
        removeAttr: function(t) {
            return this.each(function() {
                rt.removeAttr(this, t)
            })
        }
    }),
    rt.extend({
        attr: function(t, e, n) {
            var i, r, o = t.nodeType;
            if (t && 3 !== o && 8 !== o && 2 !== o) return typeof t.getAttribute === Tt ? rt.prop(t, e, n) : (1 === o && rt.isXMLDoc(t) || (e = e.toLowerCase(), i = rt.attrHooks[e] || (rt.expr.match.bool.test(e) ? ke: xe)), void 0 === n ? i && "get" in i && null !== (r = i.get(t, e)) ? r: (r = rt.find.attr(t, e), null == r ? void 0 : r) : null !== n ? i && "set" in i && void 0 !== (r = i.set(t, n, e)) ? r: (t.setAttribute(e, n + ""), n) : void rt.removeAttr(t, e))
        },
        removeAttr: function(t, e) {
            var n, i, r = 0,
            o = e && e.match(bt);
            if (o && 1 === t.nodeType) for (; n = o[r++];) i = rt.propFix[n] || n,
            rt.expr.match.bool.test(n) ? $e && Ce || !Ee.test(n) ? t[i] = !1 : t[rt.camelCase("default-" + n)] = t[i] = !1 : rt.attr(t, n, ""),
            t.removeAttribute(Ce ? n: i)
        },
        attrHooks: {
            type: {
                set: function(t, e) {
                    if (!nt.radioValue && "radio" === e && rt.nodeName(t, "input")) {
                        var n = t.value;
                        return t.setAttribute("type", e),
                        n && (t.value = n),
                        e
                    }
                }
            }
        }
    }),
    ke = {
        set: function(t, e, n) {
            return e === !1 ? rt.removeAttr(t, n) : $e && Ce || !Ee.test(n) ? t.setAttribute(!Ce && rt.propFix[n] || n, n) : t[rt.camelCase("default-" + n)] = t[n] = !0,
            n
        }
    },
    rt.each(rt.expr.match.bool.source.match(/\w+/g),
    function(t, e) {
        var n = Te[e] || rt.find.attr;
        Te[e] = $e && Ce || !Ee.test(e) ?
        function(t, e, i) {
            var r, o;
            return i || (o = Te[e], Te[e] = r, r = null != n(t, e, i) ? e.toLowerCase() : null, Te[e] = o),
            r
        }: function(t, e, n) {
            return n ? void 0 : t[rt.camelCase("default-" + e)] ? e.toLowerCase() : null
        }
    }),
    $e && Ce || (rt.attrHooks.value = {
        set: function(t, e, n) {
            return rt.nodeName(t, "input") ? void(t.defaultValue = e) : xe && xe.set(t, e, n)
        }
    }),
    Ce || (xe = {
        set: function(t, e, n) {
            var i = t.getAttributeNode(n);
            return i || t.setAttributeNode(i = t.ownerDocument.createAttribute(n)),
            i.value = e += "",
            "value" === n || e === t.getAttribute(n) ? e: void 0
        }
    },
    Te.id = Te.name = Te.coords = function(t, e, n) {
        var i;
        return n ? void 0 : (i = t.getAttributeNode(e)) && "" !== i.value ? i.value: null
    },
    rt.valHooks.button = {
        get: function(t, e) {
            var n = t.getAttributeNode(e);
            return n && n.specified ? n.value: void 0
        },
        set: xe.set
    },
    rt.attrHooks.contenteditable = {
        set: function(t, e, n) {
            xe.set(t, "" === e ? !1 : e, n)
        }
    },
    rt.each(["width", "height"],
    function(t, e) {
        rt.attrHooks[e] = {
            set: function(t, n) {
                return "" === n ? (t.setAttribute(e, "auto"), n) : void 0
            }
        }
    })),
    nt.style || (rt.attrHooks.style = {
        get: function(t) {
            return t.style.cssText || void 0
        },
        set: function(t, e) {
            return t.style.cssText = e + ""
        }
    });
    var _e = /^(?:input|select|textarea|button|object)$/i,
    Se = /^(?:a|area)$/i;
    rt.fn.extend({
        prop: function(t, e) {
            return At(this, rt.prop, t, e, arguments.length > 1)
        },
        removeProp: function(t) {
            return t = rt.propFix[t] || t,
            this.each(function() {
                try {
                    this[t] = void 0,
                    delete this[t]
                } catch(e) {}
            })
        }
    }),
    rt.extend({
        propFix: {
            "for": "htmlFor",
            "class": "className"
        },
        prop: function(t, e, n) {
            var i, r, o, s = t.nodeType;
            if (t && 3 !== s && 8 !== s && 2 !== s) return o = 1 !== s || !rt.isXMLDoc(t),
            o && (e = rt.propFix[e] || e, r = rt.propHooks[e]),
            void 0 !== n ? r && "set" in r && void 0 !== (i = r.set(t, n, e)) ? i: t[e] = n: r && "get" in r && null !== (i = r.get(t, e)) ? i: t[e]
        },
        propHooks: {
            tabIndex: {
                get: function(t) {
                    var e = rt.find.attr(t, "tabindex");
                    return e ? parseInt(e, 10) : _e.test(t.nodeName) || Se.test(t.nodeName) && t.href ? 0 : -1
                }
            }
        }
    }),
    nt.hrefNormalized || rt.each(["href", "src"],
    function(t, e) {
        rt.propHooks[e] = {
            get: function(t) {
                return t.getAttribute(e, 4)
            }
        }
    }),
    nt.optSelected || (rt.propHooks.selected = {
        get: function(t) {
            var e = t.parentNode;
            return e && (e.selectedIndex, e.parentNode && e.parentNode.selectedIndex),
            null
        }
    }),
    rt.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"],
    function() {
        rt.propFix[this.toLowerCase()] = this
    }),
    nt.enctype || (rt.propFix.enctype = "encoding");
    var Ae = /[\t\r\n\f]/g;
    rt.fn.extend({
        addClass: function(t) {
            var e, n, i, r, o, s, a = 0,
            l = this.length,
            u = "string" == typeof t && t;
            if (rt.isFunction(t)) return this.each(function(e) {
                rt(this).addClass(t.call(this, e, this.className))
            });
            if (u) for (e = (t || "").match(bt) || []; l > a; a++) if (n = this[a], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(Ae, " ") : " ")) {
                for (o = 0; r = e[o++];) i.indexOf(" " + r + " ") < 0 && (i += r + " ");
                s = rt.trim(i),
                n.className !== s && (n.className = s)
            }
            return this
        },
        removeClass: function(t) {
            var e, n, i, r, o, s, a = 0,
            l = this.length,
            u = 0 === arguments.length || "string" == typeof t && t;
            if (rt.isFunction(t)) return this.each(function(e) {
                rt(this).removeClass(t.call(this, e, this.className))
            });
            if (u) for (e = (t || "").match(bt) || []; l > a; a++) if (n = this[a], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(Ae, " ") : "")) {
                for (o = 0; r = e[o++];) for (; i.indexOf(" " + r + " ") >= 0;) i = i.replace(" " + r + " ", " ");
                s = t ? rt.trim(i) : "",
                n.className !== s && (n.className = s)
            }
            return this
        },
        toggleClass: function(t, e) {
            var n = typeof t;
            return "boolean" == typeof e && "string" === n ? e ? this.addClass(t) : this.removeClass(t) : rt.isFunction(t) ? this.each(function(n) {
                rt(this).toggleClass(t.call(this, n, this.className, e), e)
            }) : this.each(function() {
                if ("string" === n) for (var e, i = 0,
                r = rt(this), o = t.match(bt) || []; e = o[i++];) r.hasClass(e) ? r.removeClass(e) : r.addClass(e);
                else(n === Tt || "boolean" === n) && (this.className && rt._data(this, "__className__", this.className), this.className = this.className || t === !1 ? "": rt._data(this, "__className__") || "")
            })
        },
        hasClass: function(t) {
            for (var e = " " + t + " ",
            n = 0,
            i = this.length; i > n; n++) if (1 === this[n].nodeType && (" " + this[n].className + " ").replace(Ae, " ").indexOf(e) >= 0) return ! 0;
            return ! 1
        }
    }),
    rt.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),
    function(t, e) {
        rt.fn[e] = function(t, n) {
            return arguments.length > 0 ? this.on(e, null, t, n) : this.trigger(e)
        }
    }),
    rt.fn.extend({
        hover: function(t, e) {
            return this.mouseenter(t).mouseleave(e || t)
        },
        bind: function(t, e, n) {
            return this.on(t, null, e, n)
        },
        unbind: function(t, e) {
            return this.off(t, null, e)
        },
        delegate: function(t, e, n, i) {
            return this.on(e, t, n, i)
        },
        undelegate: function(t, e, n) {
            return 1 === arguments.length ? this.off(t, "**") : this.off(e, t || "**", n)
        }
    });
    var Ne = rt.now(),
    De = /\?/,
    Fe = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
    rt.parseJSON = function(e) {
        if (t.JSON && t.JSON.parse) return t.JSON.parse(e + "");
        var n, i = null,
        r = rt.trim(e + "");
        return r && !rt.trim(r.replace(Fe,
        function(t, e, r, o) {
            return n && e && (i = 0),
            0 === i ? t: (n = r || e, i += !o - !r, "")
        })) ? Function("return " + r)() : rt.error("Invalid JSON: " + e)
    },
    rt.parseXML = function(e) {
        var n, i;
        if (!e || "string" != typeof e) return null;
        try {
            t.DOMParser ? (i = new DOMParser, n = i.parseFromString(e, "text/xml")) : (n = new ActiveXObject("Microsoft.XMLDOM"), n.async = "false", n.loadXML(e))
        } catch(r) {
            n = void 0
        }
        return n && n.documentElement && !n.getElementsByTagName("parsererror").length || rt.error("Invalid XML: " + e),
        n
    };
    var Le, je, Ie = /#.*$/,
    Oe = /([?&])_=[^&]*/,
    Re = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm,
    He = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
    Pe = /^(?:GET|HEAD)$/,
    qe = /^\/\//,
    ze = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
    Me = {},
    Ue = {},
    Be = "*/".concat("*");
    try {
        je = location.href
    } catch(We) {
        je = ft.createElement("a"),
        je.href = "",
        je = je.href
    }
    Le = ze.exec(je.toLowerCase()) || [],
    rt.extend({
        active: 0,
        lastModified: {},
        etag: {},
        ajaxSettings: {
            url: je,
            type: "GET",
            isLocal: He.test(Le[1]),
            global: !0,
            processData: !0,
            async: !0,
            contentType: "application/x-www-form-urlencoded; charset=UTF-8",
            accepts: {
                "*": Be,
                text: "text/plain",
                html: "text/html",
                xml: "application/xml, text/xml",
                json: "application/json, text/javascript"
            },
            contents: {
                xml: /xml/,
                html: /html/,
                json: /json/
            },
            responseFields: {
                xml: "responseXML",
                text: "responseText",
                json: "responseJSON"
            },
            converters: {
                "* text": String,
                "text html": !0,
                "text json": rt.parseJSON,
                "text xml": rt.parseXML
            },
            flatOptions: {
                url: !0,
                context: !0
            }
        },
        ajaxSetup: function(t, e) {
            return e ? z(z(t, rt.ajaxSettings), e) : z(rt.ajaxSettings, t)
        },
        ajaxPrefilter: P(Me),
        ajaxTransport: P(Ue),
        ajax: function(t, e) {
            function n(t, e, n, i) {
                var r, c, v, y, w, k = e;
                2 !== b && (b = 2, a && clearTimeout(a), u = void 0, s = i || "", x.readyState = t > 0 ? 4 : 0, r = t >= 200 && 300 > t || 304 === t, n && (y = M(d, x, n)), y = U(d, y, x, r), r ? (d.ifModified && (w = x.getResponseHeader("Last-Modified"), w && (rt.lastModified[o] = w), w = x.getResponseHeader("etag"), w && (rt.etag[o] = w)), 204 === t || "HEAD" === d.type ? k = "nocontent": 304 === t ? k = "notmodified": (k = y.state, c = y.data, v = y.error, r = !v)) : (v = k, (t || !k) && (k = "error", 0 > t && (t = 0))), x.status = t, x.statusText = (e || k) + "", r ? f.resolveWith(h, [c, k, x]) : f.rejectWith(h, [x, k, v]), x.statusCode(g), g = void 0, l && p.trigger(r ? "ajaxSuccess": "ajaxError", [x, d, r ? c: v]), m.fireWith(h, [x, k]), l && (p.trigger("ajaxComplete", [x, d]), --rt.active || rt.event.trigger("ajaxStop")))
            }
            "object" == typeof t && (e = t, t = void 0),
            e = e || {};
            var i, r, o, s, a, l, u, c, d = rt.ajaxSetup({},
            e),
            h = d.context || d,
            p = d.context && (h.nodeType || h.jquery) ? rt(h) : rt.event,
            f = rt.Deferred(),
            m = rt.Callbacks("once memory"),
            g = d.statusCode || {},
            v = {},
            y = {},
            b = 0,
            w = "canceled",
            x = {
                readyState: 0,
                getResponseHeader: function(t) {
                    var e;
                    if (2 === b) {
                        if (!c) for (c = {}; e = Re.exec(s);) c[e[1].toLowerCase()] = e[2];
                        e = c[t.toLowerCase()]
                    }
                    return null == e ? null: e
                },
                getAllResponseHeaders: function() {
                    return 2 === b ? s: null
                },
                setRequestHeader: function(t, e) {
                    var n = t.toLowerCase();
                    return b || (t = y[n] = y[n] || t, v[t] = e),
                    this
                },
                overrideMimeType: function(t) {
                    return b || (d.mimeType = t),
                    this
                },
                statusCode: function(t) {
                    var e;
                    if (t) if (2 > b) for (e in t) g[e] = [g[e], t[e]];
                    else x.always(t[x.status]);
                    return this
                },
                abort: function(t) {
                    var e = t || w;
                    return u && u.abort(e),
                    n(0, e),
                    this
                }
            };
            if (f.promise(x).complete = m.add, x.success = x.done, x.error = x.fail, d.url = ((t || d.url || je) + "").replace(Ie, "").replace(qe, Le[1] + "//"), d.type = e.method || e.type || d.method || d.type, d.dataTypes = rt.trim(d.dataType || "*").toLowerCase().match(bt) || [""], null == d.crossDomain && (i = ze.exec(d.url.toLowerCase()), d.crossDomain = !(!i || i[1] === Le[1] && i[2] === Le[2] && (i[3] || ("http:" === i[1] ? "80": "443")) === (Le[3] || ("http:" === Le[1] ? "80": "443")))), d.data && d.processData && "string" != typeof d.data && (d.data = rt.param(d.data, d.traditional)), q(Me, d, e, x), 2 === b) return x;
            l = rt.event && d.global,
            l && 0 === rt.active++&&rt.event.trigger("ajaxStart"),
            d.type = d.type.toUpperCase(),
            d.hasContent = !Pe.test(d.type),
            o = d.url,
            d.hasContent || (d.data && (o = d.url += (De.test(o) ? "&": "?") + d.data, delete d.data), d.cache === !1 && (d.url = Oe.test(o) ? o.replace(Oe, "$1_=" + Ne++) : o + (De.test(o) ? "&": "?") + "_=" + Ne++)),
            d.ifModified && (rt.lastModified[o] && x.setRequestHeader("If-Modified-Since", rt.lastModified[o]), rt.etag[o] && x.setRequestHeader("If-None-Match", rt.etag[o])),
            (d.data && d.hasContent && d.contentType !== !1 || e.contentType) && x.setRequestHeader("Content-Type", d.contentType),
            x.setRequestHeader("Accept", d.dataTypes[0] && d.accepts[d.dataTypes[0]] ? d.accepts[d.dataTypes[0]] + ("*" !== d.dataTypes[0] ? ", " + Be + "; q=0.01": "") : d.accepts["*"]);
            for (r in d.headers) x.setRequestHeader(r, d.headers[r]);
            if (d.beforeSend && (d.beforeSend.call(h, x, d) === !1 || 2 === b)) return x.abort();
            w = "abort";
            for (r in {
                success: 1,
                error: 1,
                complete: 1
            }) x[r](d[r]);
            if (u = q(Ue, d, e, x)) {
                x.readyState = 1,
                l && p.trigger("ajaxSend", [x, d]),
                d.async && d.timeout > 0 && (a = setTimeout(function() {
                    x.abort("timeout")
                },
                d.timeout));
                try {
                    b = 1,
                    u.send(v, n)
                } catch(k) {
                    if (! (2 > b)) throw k;
                    n( - 1, k)
                }
            } else n( - 1, "No Transport");
            return x
        },
        getJSON: function(t, e, n) {
            return rt.get(t, e, n, "json")
        },
        getScript: function(t, e) {
            return rt.get(t, void 0, e, "script")
        }
    }),
    rt.each(["get", "post"],
    function(t, e) {
        rt[e] = function(t, n, i, r) {
            return rt.isFunction(n) && (r = r || i, i = n, n = void 0),
            rt.ajax({
                url: t,
                type: e,
                dataType: r,
                data: n,
                success: i
            })
        }
    }),
    rt._evalUrl = function(t) {
        return rt.ajax({
            url: t,
            type: "GET",
            dataType: "script",
            async: !1,
            global: !1,
            "throws": !0
        })
    },
    rt.fn.extend({
        wrapAll: function(t) {
            if (rt.isFunction(t)) return this.each(function(e) {
                rt(this).wrapAll(t.call(this, e))
            });
            if (this[0]) {
                var e = rt(t, this[0].ownerDocument).eq(0).clone(!0);
                this[0].parentNode && e.insertBefore(this[0]),
                e.map(function() {
                    for (var t = this; t.firstChild && 1 === t.firstChild.nodeType;) t = t.firstChild;
                    return t
                }).append(this)
            }
            return this
        },
        wrapInner: function(t) {
            return rt.isFunction(t) ? this.each(function(e) {
                rt(this).wrapInner(t.call(this, e))
            }) : this.each(function() {
                var e = rt(this),
                n = e.contents();
                n.length ? n.wrapAll(t) : e.append(t)
            })
        },
        wrap: function(t) {
            var e = rt.isFunction(t);
            return this.each(function(n) {
                rt(this).wrapAll(e ? t.call(this, n) : t)
            })
        },
        unwrap: function() {
            return this.parent().each(function() {
                rt.nodeName(this, "body") || rt(this).replaceWith(this.childNodes)
            }).end()
        }
    }),
    rt.expr.filters.hidden = function(t) {
        return t.offsetWidth <= 0 && t.offsetHeight <= 0 || !nt.reliableHiddenOffsets() && "none" === (t.style && t.style.display || rt.css(t, "display"))
    },
    rt.expr.filters.visible = function(t) {
        return ! rt.expr.filters.hidden(t)
    };
    var Ve = /%20/g,
    Qe = /\[\]$/,
    Xe = /\r?\n/g,
    Ge = /^(?:submit|button|image|reset|file)$/i,
    Je = /^(?:input|select|textarea|keygen)/i;
    rt.param = function(t, e) {
        var n, i = [],
        r = function(t, e) {
            e = rt.isFunction(e) ? e() : null == e ? "": e,
            i[i.length] = encodeURIComponent(t) + "=" + encodeURIComponent(e)
        };
        if (void 0 === e && (e = rt.ajaxSettings && rt.ajaxSettings.traditional), rt.isArray(t) || t.jquery && !rt.isPlainObject(t)) rt.each(t,
        function() {
            r(this.name, this.value)
        });
        else for (n in t) B(n, t[n], e, r);
        return i.join("&").replace(Ve, "+")
    },
    rt.fn.extend({
        serialize: function() {
            return rt.param(this.serializeArray())
        },
        serializeArray: function() {
            return this.map(function() {
                var t = rt.prop(this, "elements");
                return t ? rt.makeArray(t) : this
            }).filter(function() {
                var t = this.type;
                return this.name && !rt(this).is(":disabled") && Je.test(this.nodeName) && !Ge.test(t) && (this.checked || !Nt.test(t))
            }).map(function(t, e) {
                var n = rt(this).val();
                return null == n ? null: rt.isArray(n) ? rt.map(n,
                function(t) {
                    return {
                        name: e.name,
                        value: t.replace(Xe, "\r\n")
                    }
                }) : {
                    name: e.name,
                    value: n.replace(Xe, "\r\n")
                }
            }).get()
        }
    }),
    rt.ajaxSettings.xhr = void 0 !== t.ActiveXObject ?
    function() {
        return ! this.isLocal && /^(get|post|head|put|delete|options)$/i.test(this.type) && W() || V()
    }: W;
    var Ke = 0,
    Ye = {},
    Ze = rt.ajaxSettings.xhr();
    t.attachEvent && t.attachEvent("onunload",
    function() {
        for (var t in Ye) Ye[t](void 0, !0)
    }),
    nt.cors = !!Ze && "withCredentials" in Ze,
    Ze = nt.ajax = !!Ze,
    Ze && rt.ajaxTransport(function(t) {
        if (!t.crossDomain || nt.cors) {
            var e;
            return {
                send: function(n, i) {
                    var r, o = t.xhr(),
                    s = ++Ke;
                    if (o.open(t.type, t.url, t.async, t.username, t.password), t.xhrFields) for (r in t.xhrFields) o[r] = t.xhrFields[r];
                    t.mimeType && o.overrideMimeType && o.overrideMimeType(t.mimeType),
                    t.crossDomain || n["X-Requested-With"] || (n["X-Requested-With"] = "XMLHttpRequest");
                    for (r in n) void 0 !== n[r] && o.setRequestHeader(r, n[r] + "");
                    o.send(t.hasContent && t.data || null),
                    e = function(n, r) {
                        var a, l, u;
                        if (e && (r || 4 === o.readyState)) if (delete Ye[s], e = void 0, o.onreadystatechange = rt.noop, r) 4 !== o.readyState && o.abort();
                        else {
                            u = {},
                            a = o.status,
                            "string" == typeof o.responseText && (u.text = o.responseText);
                            try {
                                l = o.statusText
                            } catch(c) {
                                l = ""
                            }
                            a || !t.isLocal || t.crossDomain ? 1223 === a && (a = 204) : a = u.text ? 200 : 404
                        }
                        u && i(a, l, u, o.getAllResponseHeaders())
                    },
                    t.async ? 4 === o.readyState ? setTimeout(e) : o.onreadystatechange = Ye[s] = e: e()
                },
                abort: function() {
                    e && e(void 0, !0)
                }
            }
        }
    }),
    rt.ajaxSetup({
        accepts: {
            script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
        },
        contents: {
            script: /(?:java|ecma)script/
        },
        converters: {
            "text script": function(t) {
                return rt.globalEval(t),
                t
            }
        }
    }),
    rt.ajaxPrefilter("script",
    function(t) {
        void 0 === t.cache && (t.cache = !1),
        t.crossDomain && (t.type = "GET", t.global = !1)
    }),
    rt.ajaxTransport("script",
    function(t) {
        if (t.crossDomain) {
            var e, n = ft.head || rt("head")[0] || ft.documentElement;
            return {
                send: function(i, r) {
                    e = ft.createElement("script"),
                    e.async = !0,
                    t.scriptCharset && (e.charset = t.scriptCharset),
                    e.src = t.url,
                    e.onload = e.onreadystatechange = function(t, n) { (n || !e.readyState || /loaded|complete/.test(e.readyState)) && (e.onload = e.onreadystatechange = null, e.parentNode && e.parentNode.removeChild(e), e = null, n || r(200, "success"))
                    },
                    n.insertBefore(e, n.firstChild)
                },
                abort: function() {
                    e && e.onload(void 0, !0)
                }
            }
        }
    });
    var tn = [],
    en = /(=)\?(?=&|$)|\?\?/;
    rt.ajaxSetup({
        jsonp: "callback",
        jsonpCallback: function() {
            var t = tn.pop() || rt.expando + "_" + Ne++;
            return this[t] = !0,
            t
        }
    }),
    rt.ajaxPrefilter("json jsonp",
    function(e, n, i) {
        var r, o, s, a = e.jsonp !== !1 && (en.test(e.url) ? "url": "string" == typeof e.data && !(e.contentType || "").indexOf("application/x-www-form-urlencoded") && en.test(e.data) && "data");
        return a || "jsonp" === e.dataTypes[0] ? (r = e.jsonpCallback = rt.isFunction(e.jsonpCallback) ? e.jsonpCallback() : e.jsonpCallback, a ? e[a] = e[a].replace(en, "$1" + r) : e.jsonp !== !1 && (e.url += (De.test(e.url) ? "&": "?") + e.jsonp + "=" + r), e.converters["script json"] = function() {
            return s || rt.error(r + " was not called"),
            s[0]
        },
        e.dataTypes[0] = "json", o = t[r], t[r] = function() {
            s = arguments
        },
        i.always(function() {
            t[r] = o,
            e[r] && (e.jsonpCallback = n.jsonpCallback, tn.push(r)),
            s && rt.isFunction(o) && o(s[0]),
            s = o = void 0
        }), "script") : void 0
    }),
    rt.parseHTML = function(t, e, n) {
        if (!t || "string" != typeof t) return null;
        "boolean" == typeof e && (n = e, e = !1),
        e = e || ft;
        var i = dt.exec(t),
        r = !n && [];
        return i ? [e.createElement(i[1])] : (i = rt.buildFragment([t], e, r), r && r.length && rt(r).remove(), rt.merge([], i.childNodes))
    };
    var nn = rt.fn.load;
    rt.fn.load = function(t, e, n) {
        if ("string" != typeof t && nn) return nn.apply(this, arguments);
        var i, r, o, s = this,
        a = t.indexOf(" ");
        return a >= 0 && (i = rt.trim(t.slice(a, t.length)), t = t.slice(0, a)),
        rt.isFunction(e) ? (n = e, e = void 0) : e && "object" == typeof e && (o = "POST"),
        s.length > 0 && rt.ajax({
            url: t,
            type: o,
            dataType: "html",
            data: e
        }).done(function(t) {
            r = arguments,
            s.html(i ? rt("<div>").append(rt.parseHTML(t)).find(i) : t)
        }).complete(n &&
        function(t, e) {
            s.each(n, r || [t.responseText, e, t])
        }),
        this
    },
    rt.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"],
    function(t, e) {
        rt.fn[e] = function(t) {
            return this.on(e, t)
        }
    }),
    rt.expr.filters.animated = function(t) {
        return rt.grep(rt.timers,
        function(e) {
            return t === e.elem
        }).length
    };
    var rn = t.document.documentElement;
    rt.offset = {
        setOffset: function(t, e, n) {
            var i, r, o, s, a, l, u, c = rt.css(t, "position"),
            d = rt(t),
            h = {};
            "static" === c && (t.style.position = "relative"),
            a = d.offset(),
            o = rt.css(t, "top"),
            l = rt.css(t, "left"),
            u = ("absolute" === c || "fixed" === c) && rt.inArray("auto", [o, l]) > -1,
            u ? (i = d.position(), s = i.top, r = i.left) : (s = parseFloat(o) || 0, r = parseFloat(l) || 0),
            rt.isFunction(e) && (e = e.call(t, n, a)),
            null != e.top && (h.top = e.top - a.top + s),
            null != e.left && (h.left = e.left - a.left + r),
            "using" in e ? e.using.call(t, h) : d.css(h)
        }
    },
    rt.fn.extend({
        offset: function(t) {
            if (arguments.length) return void 0 === t ? this: this.each(function(e) {
                rt.offset.setOffset(this, t, e)
            });
            var e, n, i = {
                top: 0,
                left: 0
            },
            r = this[0],
            o = r && r.ownerDocument;
            if (o) return e = o.documentElement,
            rt.contains(e, r) ? (typeof r.getBoundingClientRect !== Tt && (i = r.getBoundingClientRect()), n = Q(o), {
                top: i.top + (n.pageYOffset || e.scrollTop) - (e.clientTop || 0),
                left: i.left + (n.pageXOffset || e.scrollLeft) - (e.clientLeft || 0)
            }) : i
        },
        position: function() {
            if (this[0]) {
                var t, e, n = {
                    top: 0,
                    left: 0
                },
                i = this[0];
                return "fixed" === rt.css(i, "position") ? e = i.getBoundingClientRect() : (t = this.offsetParent(), e = this.offset(), rt.nodeName(t[0], "html") || (n = t.offset()), n.top += rt.css(t[0], "borderTopWidth", !0), n.left += rt.css(t[0], "borderLeftWidth", !0)),
                {
                    top: e.top - n.top - rt.css(i, "marginTop", !0),
                    left: e.left - n.left - rt.css(i, "marginLeft", !0)
                }
            }
        },
        offsetParent: function() {
            return this.map(function() {
                for (var t = this.offsetParent || rn; t && !rt.nodeName(t, "html") && "static" === rt.css(t, "position");) t = t.offsetParent;
                return t || rn
            })
        }
    }),
    rt.each({
        scrollLeft: "pageXOffset",
        scrollTop: "pageYOffset"
    },
    function(t, e) {
        var n = /Y/.test(e);
        rt.fn[t] = function(i) {
            return At(this,
            function(t, i, r) {
                var o = Q(t);
                return void 0 === r ? o ? e in o ? o[e] : o.document.documentElement[i] : t[i] : void(o ? o.scrollTo(n ? rt(o).scrollLeft() : r, n ? r: rt(o).scrollTop()) : t[i] = r)
            },
            t, i, arguments.length, null)
        }
    }),
    rt.each(["top", "left"],
    function(t, e) {
        rt.cssHooks[e] = $(nt.pixelPosition,
        function(t, n) {
            return n ? (n = ee(t, e), ie.test(n) ? rt(t).position()[e] + "px": n) : void 0
        })
    }),
    rt.each({
        Height: "height",
        Width: "width"
    },
    function(t, e) {
        rt.each({
            padding: "inner" + t,
            content: e,
            "": "outer" + t
        },
        function(n, i) {
            rt.fn[i] = function(i, r) {
                var o = arguments.length && (n || "boolean" != typeof i),
                s = n || (i === !0 || r === !0 ? "margin": "border");
                return At(this,
                function(e, n, i) {
                    var r;
                    return rt.isWindow(e) ? e.document.documentElement["client" + t] : 9 === e.nodeType ? (r = e.documentElement, Math.max(e.body["scroll" + t], r["scroll" + t], e.body["offset" + t], r["offset" + t], r["client" + t])) : void 0 === i ? rt.css(e, n, s) : rt.style(e, n, i, s)
                },
                e, o ? i: void 0, o, null)
            }
        })
    }),
    rt.fn.size = function() {
        return this.length
    },
    rt.fn.andSelf = rt.fn.addBack,
    "function" == typeof define && define.amd && define("jquery", [],
    function() {
        return rt
    });
    var on = t.jQuery,
    sn = t.$;
    return rt.noConflict = function(e) {
        return t.$ === rt && (t.$ = sn),
        e && t.jQuery === rt && (t.jQuery = on),
        rt
    },
    typeof e === Tt && (t.jQuery = t.$ = rt),
    rt
}),
/*
jQuery.Turbolinks ~ https://github.com/kossnocorp/jquery.turbolinks
jQuery plugin for drop-in fix binded events problem caused by Turbolinks

The MIT License
Copyright (c) 2012-2013 Sasha Koss & Rico Sta. Cruz
 */
function() {
    var t, e;
    t = window.jQuery || ("function" == typeof require ? require("jquery") : void 0),
    e = t(document),
    t.turbo = {
        version: "2.1.0",
        isReady: !1,
        use: function(t, n) {
            return e.off(".turbo").on("" + t + ".turbo", this.onLoad).on("" + n + ".turbo", this.onFetch)
        },
        addCallback: function(n) {
            return t.turbo.isReady && n(t),
            e.on("turbo:ready",
            function() {
                return n(t)
            })
        },
        onLoad: function() {
            return t.turbo.isReady = !0,
            e.trigger("turbo:ready")
        },
        onFetch: function() {
            return t.turbo.isReady = !1
        },
        register: function() {
            return t(this.onLoad),
            t.fn.ready = this.addCallback
        }
    },
    t.turbo.register(),
    t.turbo.use("page:load", "page:fetch")
}.call(this),
function(t, e) {
    "use strict";
    t.rails !== e && t.error("jquery-ujs has already been loaded!");
    var n, i = t(document);
    t.rails = n = {
        linkClickSelector: "a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]",
        buttonClickSelector: "button[data-remote]:not(form button), button[data-confirm]:not(form button)",
        inputChangeSelector: "select[data-remote], input[data-remote], textarea[data-remote]",
        formSubmitSelector: "form",
        formInputClickSelector: "form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",
        disableSelector: "input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",
        enableSelector: "input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",
        requiredInputSelector: "input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",
        fileInputSelector: "input[type=file]:not([disabled])",
        linkDisableSelector: "a[data-disable-with], a[data-disable]",
        buttonDisableSelector: "button[data-remote][data-disable-with], button[data-remote][data-disable]",
        csrfToken: function() {
            return t("meta[name=csrf-token]").attr("content")
        },
        csrfParam: function() {
            return t("meta[name=csrf-param]").attr("content")
        },
        CSRFProtection: function(t) {
            var e = n.csrfToken();
            e && t.setRequestHeader("X-CSRF-Token", e)
        },
        refreshCSRFTokens: function() {
            t('form input[name="' + n.csrfParam() + '"]').val(n.csrfToken())
        },
        fire: function(e, n, i) {
            var r = t.Event(n);
            return e.trigger(r, i),
            r.result !== !1
        },
        confirm: function(t) {
            return confirm(t)
        },
        ajax: function(e) {
            return t.ajax(e)
        },
        href: function(t) {
            return t[0].href
        },
        isRemote: function(t) {
            return t.data("remote") !== e && t.data("remote") !== !1
        },
        handleRemote: function(i) {
            var r, o, s, a, l, u;
            if (n.fire(i, "ajax:before")) {
                if (a = i.data("with-credentials") || null, l = i.data("type") || t.ajaxSettings && t.ajaxSettings.dataType, i.is("form")) {
                    r = i.attr("method"),
                    o = i.attr("action"),
                    s = i.serializeArray();
                    var c = i.data("ujs:submit-button");
                    c && (s.push(c), i.data("ujs:submit-button", null))
                } else i.is(n.inputChangeSelector) ? (r = i.data("method"), o = i.data("url"), s = i.serialize(), i.data("params") && (s = s + "&" + i.data("params"))) : i.is(n.buttonClickSelector) ? (r = i.data("method") || "get", o = i.data("url"), s = i.serialize(), i.data("params") && (s = s + "&" + i.data("params"))) : (r = i.data("method"), o = n.href(i), s = i.data("params") || null);
                return u = {
                    type: r || "GET",
                    data: s,
                    dataType: l,
                    beforeSend: function(t, r) {
                        return r.dataType === e && t.setRequestHeader("accept", "*/*;q=0.5, " + r.accepts.script),
                        n.fire(i, "ajax:beforeSend", [t, r]) ? void i.trigger("ajax:send", t) : !1
                    },
                    success: function(t, e, n) {
                        i.trigger("ajax:success", [t, e, n])
                    },
                    complete: function(t, e) {
                        i.trigger("ajax:complete", [t, e])
                    },
                    error: function(t, e, n) {
                        i.trigger("ajax:error", [t, e, n])
                    },
                    crossDomain: n.isCrossDomain(o)
                },
                a && (u.xhrFields = {
                    withCredentials: a
                }),
                o && (u.url = o),
                n.ajax(u)
            }
            return ! 1
        },
        isCrossDomain: function(t) {
            var e = document.createElement("a");
            e.href = location.href;
            var n = document.createElement("a");
            try {
                return n.href = t,
                n.href = n.href,
                !((!n.protocol || ":" === n.protocol) && !n.host || e.protocol + "//" + e.host == n.protocol + "//" + n.host)
            } catch(i) {
                return ! 0
            }
        },
        handleMethod: function(i) {
            var r = n.href(i),
            o = i.data("method"),
            s = i.attr("target"),
            a = n.csrfToken(),
            l = n.csrfParam(),
            u = t('<form method="post" action="' + r + '"></form>'),
            c = '<input name="_method" value="' + o + '" type="hidden" />';
            l === e || a === e || n.isCrossDomain(r) || (c += '<input name="' + l + '" value="' + a + '" type="hidden" />'),
            s && u.attr("target", s),
            u.hide().append(c).appendTo("body"),
            u.submit()
        },
        formElements: function(e, n) {
            return e.is("form") ? t(e[0].elements).filter(n) : e.find(n)
        },
        disableFormElements: function(e) {
            n.formElements(e, n.disableSelector).each(function() {
                n.disableFormElement(t(this))
            })
        },
        disableFormElement: function(t) {
            var n, i;
            n = t.is("button") ? "html": "val",
            i = t.data("disable-with"),
            t.data("ujs:enable-with", t[n]()),
            i !== e && t[n](i),
            t.prop("disabled", !0)
        },
        enableFormElements: function(e) {
            n.formElements(e, n.enableSelector).each(function() {
                n.enableFormElement(t(this))
            })
        },
        enableFormElement: function(t) {
            var e = t.is("button") ? "html": "val";
            "undefined" != typeof t.data("ujs:enable-with") && t[e](t.data("ujs:enable-with")),
            t.prop("disabled", !1)
        },
        allowAction: function(t) {
            var e, i = t.data("confirm"),
            r = !1;
            if (!i) return ! 0;
            if (n.fire(t, "confirm")) {
                try {
                    r = n.confirm(i)
                } catch(o) { (console.error || console.log).call(console, o.stack || o)
                }
                e = n.fire(t, "confirm:complete", [r])
            }
            return r && e
        },
        blankInputs: function(e, n, i) {
            var r, o, s = t(),
            a = n || "input,textarea",
            l = e.find(a);
            return l.each(function() {
                if (r = t(this), o = r.is("input[type=checkbox],input[type=radio]") ? r.is(":checked") : !!r.val(), o === i) {
                    if (r.is("input[type=radio]") && l.filter('input[type=radio]:checked[name="' + r.attr("name") + '"]').length) return ! 0;
                    s = s.add(r)
                }
            }),
            s.length ? s: !1
        },
        nonBlankInputs: function(t, e) {
            return n.blankInputs(t, e, !0)
        },
        stopEverything: function(e) {
            return t(e.target).trigger("ujs:everythingStopped"),
            e.stopImmediatePropagation(),
            !1
        },
        disableElement: function(t) {
            var i = t.data("disable-with");
            t.data("ujs:enable-with", t.html()),
            i !== e && t.html(i),
            t.bind("click.railsDisable",
            function(t) {
                return n.stopEverything(t)
            })
        },
        enableElement: function(t) {
            t.data("ujs:enable-with") !== e && (t.html(t.data("ujs:enable-with")), t.removeData("ujs:enable-with")),
            t.unbind("click.railsDisable")
        }
    },
    n.fire(i, "rails:attachBindings") && (t.ajaxPrefilter(function(t, e, i) {
        t.crossDomain || n.CSRFProtection(i)
    }), t(window).on("pageshow.rails",
    function() {
        t(t.rails.enableSelector).each(function() {
            var e = t(this);
            e.data("ujs:enable-with") && t.rails.enableFormElement(e)
        }),
        t(t.rails.linkDisableSelector).each(function() {
            var e = t(this);
            e.data("ujs:enable-with") && t.rails.enableElement(e)
        })
    }), i.delegate(n.linkDisableSelector, "ajax:complete",
    function() {
        n.enableElement(t(this))
    }), i.delegate(n.buttonDisableSelector, "ajax:complete",
    function() {
        n.enableFormElement(t(this))
    }), i.delegate(n.linkClickSelector, "click.rails",
    function(e) {
        var i = t(this),
        r = i.data("method"),
        o = i.data("params"),
        s = e.metaKey || e.ctrlKey;
        if (!n.allowAction(i)) return n.stopEverything(e);
        if (!s && i.is(n.linkDisableSelector) && n.disableElement(i), n.isRemote(i)) {
            if (s && (!r || "GET" === r) && !o) return ! 0;
            var a = n.handleRemote(i);
            return a === !1 ? n.enableElement(i) : a.fail(function() {
                n.enableElement(i)
            }),
            !1
        }
        return r ? (n.handleMethod(i), !1) : void 0
    }), i.delegate(n.buttonClickSelector, "click.rails",
    function(e) {
        var i = t(this);
        if (!n.allowAction(i) || !n.isRemote(i)) return n.stopEverything(e);
        i.is(n.buttonDisableSelector) && n.disableFormElement(i);
        var r = n.handleRemote(i);
        return r === !1 ? n.enableFormElement(i) : r.fail(function() {
            n.enableFormElement(i)
        }),
        !1
    }), i.delegate(n.inputChangeSelector, "change.rails",
    function(e) {
        var i = t(this);
        return n.allowAction(i) && n.isRemote(i) ? (n.handleRemote(i), !1) : n.stopEverything(e)
    }), i.delegate(n.formSubmitSelector, "submit.rails",
    function(i) {
        var r, o, s = t(this),
        a = n.isRemote(s);
        if (!n.allowAction(s)) return n.stopEverything(i);
        if (s.attr("novalidate") === e && (r = n.blankInputs(s, n.requiredInputSelector, !1), r && n.fire(s, "ajax:aborted:required", [r]))) return n.stopEverything(i);
        if (a) {
            if (o = n.nonBlankInputs(s, n.fileInputSelector)) {
                setTimeout(function() {
                    n.disableFormElements(s)
                },
                13);
                var l = n.fire(s, "ajax:aborted:file", [o]);
                return l || setTimeout(function() {
                    n.enableFormElements(s)
                },
                13),
                l
            }
            return n.handleRemote(s),
            !1
        }
        setTimeout(function() {
            n.disableFormElements(s)
        },
        13)
    }), i.delegate(n.formInputClickSelector, "click.rails",
    function(e) {
        var i = t(this);
        if (!n.allowAction(i)) return n.stopEverything(e);
        var r = i.attr("name"),
        o = r ? {
            name: r,
            value: i.val()
        }: null;
        i.closest("form").data("ujs:submit-button", o)
    }), i.delegate(n.formSubmitSelector, "ajax:send.rails",
    function(e) {
        this === e.target && n.disableFormElements(t(this))
    }), i.delegate(n.formSubmitSelector, "ajax:complete.rails",
    function(e) {
        this === e.target && n.enableFormElements(t(this))
    }), t(function() {
        n.refreshCSRFTokens()
    }))
} (jQuery), "undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery"); +
function(t) {
    "use strict";
    var e = t.fn.jquery.split(" ")[0].split(".");
    if (e[0] < 2 && e[1] < 9 || 1 == e[0] && 9 == e[1] && e[2] < 1) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")
} (jQuery),
+
function(t) {
    "use strict";
    function e() {
        var t = document.createElement("bootstrap"),
        e = {
            WebkitTransition: "webkitTransitionEnd",
            MozTransition: "transitionend",
            OTransition: "oTransitionEnd otransitionend",
            transition: "transitionend"
        };
        for (var n in e) if (void 0 !== t.style[n]) return {
            end: e[n]
        };
        return ! 1
    }
    t.fn.emulateTransitionEnd = function(e) {
        var n = !1,
        i = this;
        t(this).one("bsTransitionEnd",
        function() {
            n = !0
        });
        var r = function() {
            n || t(i).trigger(t.support.transition.end)
        };
        return setTimeout(r, e),
        this
    },
    t(function() {
        t.support.transition = e(),
        t.support.transition && (t.event.special.bsTransitionEnd = {
            bindType: t.support.transition.end,
            delegateType: t.support.transition.end,
            handle: function(e) {
                return t(e.target).is(this) ? e.handleObj.handler.apply(this, arguments) : void 0
            }
        })
    })
} (jQuery),
+
function(t) {
    "use strict";
    function e(e) {
        return this.each(function() {
            var n = t(this),
            r = n.data("bs.alert");
            r || n.data("bs.alert", r = new i(this)),
            "string" == typeof e && r[e].call(n)
        })
    }
    var n = '[data-dismiss="alert"]',
    i = function(e) {
        t(e).on("click", n, this.close)
    };
    i.VERSION = "3.3.2",
    i.TRANSITION_DURATION = 150,
    i.prototype.close = function(e) {
        function n() {
            s.detach().trigger("closed.bs.alert").remove()
        }
        var r = t(this),
        o = r.attr("data-target");
        o || (o = r.attr("href"), o = o && o.replace(/.*(?=#[^\s]*$)/, ""));
        var s = t(o);
        e && e.preventDefault(),
        s.length || (s = r.closest(".alert")),
        s.trigger(e = t.Event("close.bs.alert")),
        e.isDefaultPrevented() || (s.removeClass("in"), t.support.transition && s.hasClass("fade") ? s.one("bsTransitionEnd", n).emulateTransitionEnd(i.TRANSITION_DURATION) : n())
    };
    var r = t.fn.alert;
    t.fn.alert = e,
    t.fn.alert.Constructor = i,
    t.fn.alert.noConflict = function() {
        return t.fn.alert = r,
        this
    },
    t(document).on("click.bs.alert.data-api", n, i.prototype.close)
} (jQuery),
+
function(t) {
    "use strict";
    function e(e) {
        return this.each(function() {
            var i = t(this),
            r = i.data("bs.button"),
            o = "object" == typeof e && e;
            r || i.data("bs.button", r = new n(this, o)),
            "toggle" == e ? r.toggle() : e && r.setState(e)
        })
    }
    var n = function(e, i) {
        this.$element = t(e),
        this.options = t.extend({},
        n.DEFAULTS, i),
        this.isLoading = !1
    };
    n.VERSION = "3.3.2",
    n.DEFAULTS = {
        loadingText: "loading..."
    },
    n.prototype.setState = function(e) {
        var n = "disabled",
        i = this.$element,
        r = i.is("input") ? "val": "html",
        o = i.data();
        e += "Text",
        null == o.resetText && i.data("resetText", i[r]()),
        setTimeout(t.proxy(function() {
            i[r](null == o[e] ? this.options[e] : o[e]),
            "loadingText" == e ? (this.isLoading = !0, i.addClass(n).attr(n, n)) : this.isLoading && (this.isLoading = !1, i.removeClass(n).removeAttr(n))
        },
        this), 0)
    },
    n.prototype.toggle = function() {
        var t = !0,
        e = this.$element.closest('[data-toggle="buttons"]');
        if (e.length) {
            var n = this.$element.find("input");
            "radio" == n.prop("type") && (n.prop("checked") && this.$element.hasClass("active") ? t = !1 : e.find(".active").removeClass("active")),
            t && n.prop("checked", !this.$element.hasClass("active")).trigger("change")
        } else this.$element.attr("aria-pressed", !this.$element.hasClass("active"));
        t && this.$element.toggleClass("active")
    };
    var i = t.fn.button;
    t.fn.button = e,
    t.fn.button.Constructor = n,
    t.fn.button.noConflict = function() {
        return t.fn.button = i,
        this
    },
    t(document).on("click.bs.button.data-api", '[data-toggle^="button"]',
    function(n) {
        var i = t(n.target);
        i.hasClass("btn") || (i = i.closest(".btn")),
        e.call(i, "toggle"),
        n.preventDefault()
    }).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]',
    function(e) {
        t(e.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(e.type))
    })
} (jQuery),
+
function(t) {
    "use strict";
    function e(e) {
        return this.each(function() {
            var i = t(this),
            r = i.data("bs.carousel"),
            o = t.extend({},
            n.DEFAULTS, i.data(), "object" == typeof e && e),
            s = "string" == typeof e ? e: o.slide;
            r || i.data("bs.carousel", r = new n(this, o)),
            "number" == typeof e ? r.to(e) : s ? r[s]() : o.interval && r.pause().cycle()
        })
    }
    var n = function(e, n) {
        this.$element = t(e),
        this.$indicators = this.$element.find(".carousel-indicators"),
        this.options = n,
        this.paused = this.sliding = this.interval = this.$active = this.$items = null,
        this.options.keyboard && this.$element.on("keydown.bs.carousel", t.proxy(this.keydown, this)),
        "hover" == this.options.pause && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", t.proxy(this.pause, this)).on("mouseleave.bs.carousel", t.proxy(this.cycle, this))
    };
    n.VERSION = "3.3.2",
    n.TRANSITION_DURATION = 600,
    n.DEFAULTS = {
        interval: 5e3,
        pause: "hover",
        wrap: !0,
        keyboard: !0
    },
    n.prototype.keydown = function(t) {
        if (!/input|textarea/i.test(t.target.tagName)) {
            switch (t.which) {
            case 37:
                this.prev();
                break;
            case 39:
                this.next();
                break;
            default:
                return
            }
            t.preventDefault()
        }
    },
    n.prototype.cycle = function(e) {
        return e || (this.paused = !1),
        this.interval && clearInterval(this.interval),
        this.options.interval && !this.paused && (this.interval = setInterval(t.proxy(this.next, this), this.options.interval)),
        this
    },
    n.prototype.getItemIndex = function(t) {
        return this.$items = t.parent().children(".item"),
        this.$items.index(t || this.$active)
    },
    n.prototype.getItemForDirection = function(t, e) {
        var n = this.getItemIndex(e),
        i = "prev" == t && 0 === n || "next" == t && n == this.$items.length - 1;
        if (i && !this.options.wrap) return e;
        var r = "prev" == t ? -1 : 1,
        o = (n + r) % this.$items.length;
        return this.$items.eq(o)
    },
    n.prototype.to = function(t) {
        var e = this,
        n = this.getItemIndex(this.$active = this.$element.find(".item.active"));
        return t > this.$items.length - 1 || 0 > t ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel",
        function() {
            e.to(t)
        }) : n == t ? this.pause().cycle() : this.slide(t > n ? "next": "prev", this.$items.eq(t))
    },
    n.prototype.pause = function(e) {
        return e || (this.paused = !0),
        this.$element.find(".next, .prev").length && t.support.transition && (this.$element.trigger(t.support.transition.end), this.cycle(!0)),
        this.interval = clearInterval(this.interval),
        this
    },
    n.prototype.next = function() {
        return this.sliding ? void 0 : this.slide("next")
    },
    n.prototype.prev = function() {
        return this.sliding ? void 0 : this.slide("prev")
    },
    n.prototype.slide = function(e, i) {
        var r = this.$element.find(".item.active"),
        o = i || this.getItemForDirection(e, r),
        s = this.interval,
        a = "next" == e ? "left": "right",
        l = this;
        if (o.hasClass("active")) return this.sliding = !1;
        var u = o[0],
        c = t.Event("slide.bs.carousel", {
            relatedTarget: u,
            direction: a
        });
        if (this.$element.trigger(c), !c.isDefaultPrevented()) {
            if (this.sliding = !0, s && this.pause(), this.$indicators.length) {
                this.$indicators.find(".active").removeClass("active");
                var d = t(this.$indicators.children()[this.getItemIndex(o)]);
                d && d.addClass("active")
            }
            var h = t.Event("slid.bs.carousel", {
                relatedTarget: u,
                direction: a
            });
            return t.support.transition && this.$element.hasClass("slide") ? (o.addClass(e), o[0].offsetWidth, r.addClass(a), o.addClass(a), r.one("bsTransitionEnd",
            function() {
                o.removeClass([e, a].join(" ")).addClass("active"),
                r.removeClass(["active", a].join(" ")),
                l.sliding = !1,
                setTimeout(function() {
                    l.$element.trigger(h)
                },
                0)
            }).emulateTransitionEnd(n.TRANSITION_DURATION)) : (r.removeClass("active"), o.addClass("active"), this.sliding = !1, this.$element.trigger(h)),
            s && this.cycle(),
            this
        }
    };
    var i = t.fn.carousel;
    t.fn.carousel = e,
    t.fn.carousel.Constructor = n,
    t.fn.carousel.noConflict = function() {
        return t.fn.carousel = i,
        this
    };
    var r = function(n) {
        var i, r = t(this),
        o = t(r.attr("data-target") || (i = r.attr("href")) && i.replace(/.*(?=#[^\s]+$)/, ""));
        if (o.hasClass("carousel")) {
            var s = t.extend({},
            o.data(), r.data()),
            a = r.attr("data-slide-to");
            a && (s.interval = !1),
            e.call(o, s),
            a && o.data("bs.carousel").to(a),
            n.preventDefault()
        }
    };
    t(document).on("click.bs.carousel.data-api", "[data-slide]", r).on("click.bs.carousel.data-api", "[data-slide-to]", r),
    t(window).on("load",
    function() {
        t('[data-ride="carousel"]').each(function() {
            var n = t(this);
            e.call(n, n.data())
        })
    })
} (jQuery),
+
function(t) {
    "use strict";
    function e(e) {
        var n, i = e.attr("data-target") || (n = e.attr("href")) && n.replace(/.*(?=#[^\s]+$)/, "");
        return t(i)
    }
    function n(e) {
        return this.each(function() {
            var n = t(this),
            r = n.data("bs.collapse"),
            o = t.extend({},
            i.DEFAULTS, n.data(), "object" == typeof e && e); ! r && o.toggle && "show" == e && (o.toggle = !1),
            r || n.data("bs.collapse", r = new i(this, o)),
            "string" == typeof e && r[e]()
        })
    }
    var i = function(e, n) {
        this.$element = t(e),
        this.options = t.extend({},
        i.DEFAULTS, n),
        this.$trigger = t(this.options.trigger).filter('[href="#' + e.id + '"], [data-target="#' + e.id + '"]'),
        this.transitioning = null,
        this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger),
        this.options.toggle && this.toggle()
    };
    i.VERSION = "3.3.2",
    i.TRANSITION_DURATION = 350,
    i.DEFAULTS = {
        toggle: !0,
        trigger: '[data-toggle="collapse"]'
    },
    i.prototype.dimension = function() {
        var t = this.$element.hasClass("width");
        return t ? "width": "height"
    },
    i.prototype.show = function() {
        if (!this.transitioning && !this.$element.hasClass("in")) {
            var e, r = this.$parent && this.$parent.children(".panel").children(".in, .collapsing");
            if (! (r && r.length && (e = r.data("bs.collapse"), e && e.transitioning))) {
                var o = t.Event("show.bs.collapse");
                if (this.$element.trigger(o), !o.isDefaultPrevented()) {
                    r && r.length && (n.call(r, "hide"), e || r.data("bs.collapse", null));
                    var s = this.dimension();
                    this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded", !0),
                    this.$trigger.removeClass("collapsed").attr("aria-expanded", !0),
                    this.transitioning = 1;
                    var a = function() {
                        this.$element.removeClass("collapsing").addClass("collapse in")[s](""),
                        this.transitioning = 0,
                        this.$element.trigger("shown.bs.collapse")
                    };
                    if (!t.support.transition) return a.call(this);
                    var l = t.camelCase(["scroll", s].join("-"));
                    this.$element.one("bsTransitionEnd", t.proxy(a, this)).emulateTransitionEnd(i.TRANSITION_DURATION)[s](this.$element[0][l])
                }
            }
        }
    },
    i.prototype.hide = function() {
        if (!this.transitioning && this.$element.hasClass("in")) {
            var e = t.Event("hide.bs.collapse");
            if (this.$element.trigger(e), !e.isDefaultPrevented()) {
                var n = this.dimension();
                this.$element[n](this.$element[n]())[0].offsetHeight,
                this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1),
                this.$trigger.addClass("collapsed").attr("aria-expanded", !1),
                this.transitioning = 1;
                var r = function() {
                    this.transitioning = 0,
                    this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")
                };
                return t.support.transition ? void this.$element[n](0).one("bsTransitionEnd", t.proxy(r, this)).emulateTransitionEnd(i.TRANSITION_DURATION) : r.call(this)
            }
        }
    },
    i.prototype.toggle = function() {
        this[this.$element.hasClass("in") ? "hide": "show"]()
    },
    i.prototype.getParent = function() {
        return t(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(t.proxy(function(n, i) {
            var r = t(i);
            this.addAriaAndCollapsedClass(e(r), r)
        },
        this)).end()
    },
    i.prototype.addAriaAndCollapsedClass = function(t, e) {
        var n = t.hasClass("in");
        t.attr("aria-expanded", n),
        e.toggleClass("collapsed", !n).attr("aria-expanded", n)
    };
    var r = t.fn.collapse;
    t.fn.collapse = n,
    t.fn.collapse.Constructor = i,
    t.fn.collapse.noConflict = function() {
        return t.fn.collapse = r,
        this
    },
    t(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]',
    function(i) {
        var r = t(this);
        r.attr("data-target") || i.preventDefault();
        var o = e(r),
        s = o.data("bs.collapse"),
        a = s ? "toggle": t.extend({},
        r.data(), {
            trigger: this
        });
        n.call(o, a)
    })
} (jQuery),
+
function(t) {
    "use strict";
    function e(e) {
        e && 3 === e.which || (t(r).remove(), t(o).each(function() {
            var i = t(this),
            r = n(i),
            o = {
                relatedTarget: this
            };
            r.hasClass("open") && (r.trigger(e = t.Event("hide.bs.dropdown", o)), e.isDefaultPrevented() || (i.attr("aria-expanded", "false"), r.removeClass("open").trigger("hidden.bs.dropdown", o)))
        }))
    }
    function n(e) {
        var n = e.attr("data-target");
        n || (n = e.attr("href"), n = n && /#[A-Za-z]/.test(n) && n.replace(/.*(?=#[^\s]*$)/, ""));
        var i = n && t(n);
        return i && i.length ? i: e.parent()
    }
    function i(e) {
        return this.each(function() {
            var n = t(this),
            i = n.data("bs.dropdown");
            i || n.data("bs.dropdown", i = new s(this)),
            "string" == typeof e && i[e].call(n)
        })
    }
    var r = ".dropdown-backdrop",
    o = '[data-toggle="dropdown"]',
    s = function(e) {
        t(e).on("click.bs.dropdown", this.toggle)
    };
    s.VERSION = "3.3.2",
    s.prototype.toggle = function(i) {
        var r = t(this);
        if (!r.is(".disabled, :disabled")) {
            var o = n(r),
            s = o.hasClass("open");
            if (e(), !s) {
                "ontouchstart" in document.documentElement && !o.closest(".navbar-nav").length && t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click", e);
                var a = {
                    relatedTarget: this
                };
                if (o.trigger(i = t.Event("show.bs.dropdown", a)), i.isDefaultPrevented()) return;
                r.trigger("focus").attr("aria-expanded", "true"),
                o.toggleClass("open").trigger("shown.bs.dropdown", a)
            }
            return ! 1
        }
    },
    s.prototype.keydown = function(e) {
        if (/(38|40|27|32)/.test(e.which) && !/input|textarea/i.test(e.target.tagName)) {
            var i = t(this);
            if (e.preventDefault(), e.stopPropagation(), !i.is(".disabled, :disabled")) {
                var r = n(i),
                s = r.hasClass("open");
                if (!s && 27 != e.which || s && 27 == e.which) return 27 == e.which && r.find(o).trigger("focus"),
                i.trigger("click");
                var a = " li:not(.divider):visible a",
                l = r.find('[role="menu"]' + a + ', [role="listbox"]' + a);
                if (l.length) {
                    var u = l.index(e.target);
                    38 == e.which && u > 0 && u--,
                    40 == e.which && u < l.length - 1 && u++,
                    ~u || (u = 0),
                    l.eq(u).trigger("focus")
                }
            }
        }
    };
    var a = t.fn.dropdown;
    t.fn.dropdown = i,
    t.fn.dropdown.Constructor = s,
    t.fn.dropdown.noConflict = function() {
        return t.fn.dropdown = a,
        this
    },
    t(document).on("click.bs.dropdown.data-api", e).on("click.bs.dropdown.data-api", ".dropdown form",
    function(t) {
        t.stopPropagation()
    }).on("click.bs.dropdown.data-api", o, s.prototype.toggle).on("keydown.bs.dropdown.data-api", o, s.prototype.keydown).on("keydown.bs.dropdown.data-api", '[role="menu"]', s.prototype.keydown).on("keydown.bs.dropdown.data-api", '[role="listbox"]', s.prototype.keydown)
} (jQuery),
+
function(t) {
    "use strict";
    function e(e, i) {
        return this.each(function() {
            var r = t(this),
            o = r.data("bs.modal"),
            s = t.extend({},
            n.DEFAULTS, r.data(), "object" == typeof e && e);
            o || r.data("bs.modal", o = new n(this, s)),
            "string" == typeof e ? o[e](i) : s.show && o.show(i)
        })
    }
    var n = function(e, n) {
        this.options = n,
        this.$body = t(document.body),
        this.$element = t(e),
        this.$backdrop = this.isShown = null,
        this.scrollbarWidth = 0,
        this.options.remote && this.$element.find(".modal-content").load(this.options.remote, t.proxy(function() {
            this.$element.trigger("loaded.bs.modal")
        },
        this))
    };
    n.VERSION = "3.3.2",
    n.TRANSITION_DURATION = 300,
    n.BACKDROP_TRANSITION_DURATION = 150,
    n.DEFAULTS = {
        backdrop: !0,
        keyboard: !0,
        show: !0
    },
    n.prototype.toggle = function(t) {
        return this.isShown ? this.hide() : this.show(t)
    },
    n.prototype.show = function(e) {
        var i = this,
        r = t.Event("show.bs.modal", {
            relatedTarget: e
        });
        this.$element.trigger(r),
        this.isShown || r.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', t.proxy(this.hide, this)), this.backdrop(function() {
            var r = t.support.transition && i.$element.hasClass("fade");
            i.$element.parent().length || i.$element.appendTo(i.$body),
            i.$element.show().scrollTop(0),
            i.options.backdrop && i.adjustBackdrop(),
            i.adjustDialog(),
            r && i.$element[0].offsetWidth,
            i.$element.addClass("in").attr("aria-hidden", !1),
            i.enforceFocus();
            var o = t.Event("shown.bs.modal", {
                relatedTarget: e
            });
            r ? i.$element.find(".modal-dialog").one("bsTransitionEnd",
            function() {
                i.$element.trigger("focus").trigger(o)
            }).emulateTransitionEnd(n.TRANSITION_DURATION) : i.$element.trigger("focus").trigger(o)
        }))
    },
    n.prototype.hide = function(e) {
        e && e.preventDefault(),
        e = t.Event("hide.bs.modal"),
        this.$element.trigger(e),
        this.isShown && !e.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), t(document).off("focusin.bs.modal"), this.$element.removeClass("in").attr("aria-hidden", !0).off("click.dismiss.bs.modal"), t.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", t.proxy(this.hideModal, this)).emulateTransitionEnd(n.TRANSITION_DURATION) : this.hideModal())
    },
    n.prototype.enforceFocus = function() {
        t(document).off("focusin.bs.modal").on("focusin.bs.modal", t.proxy(function(t) {
            this.$element[0] === t.target || this.$element.has(t.target).length || this.$element.trigger("focus")
        },
        this))
    },
    n.prototype.escape = function() {
        this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", t.proxy(function(t) {
            27 == t.which && this.hide()
        },
        this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal")
    },
    n.prototype.resize = function() {
        this.isShown ? t(window).on("resize.bs.modal", t.proxy(this.handleUpdate, this)) : t(window).off("resize.bs.modal")
    },
    n.prototype.hideModal = function() {
        var t = this;
        this.$element.hide(),
        this.backdrop(function() {
            t.$body.removeClass("modal-open"),
            t.resetAdjustments(),
            t.resetScrollbar(),
            t.$element.trigger("hidden.bs.modal")
        })
    },
    n.prototype.removeBackdrop = function() {
        this.$backdrop && this.$backdrop.remove(),
        this.$backdrop = null
    },
    n.prototype.backdrop = function(e) {
        var i = this,
        r = this.$element.hasClass("fade") ? "fade": "";
        if (this.isShown && this.options.backdrop) {
            var o = t.support.transition && r;
            if (this.$backdrop = t('<div class="modal-backdrop ' + r + '" />').prependTo(this.$element).on("click.dismiss.bs.modal", t.proxy(function(t) {
                t.target === t.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus.call(this.$element[0]) : this.hide.call(this))
            },
            this)), o && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !e) return;
            o ? this.$backdrop.one("bsTransitionEnd", e).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION) : e()
        } else if (!this.isShown && this.$backdrop) {
            this.$backdrop.removeClass("in");
            var s = function() {
                i.removeBackdrop(),
                e && e()
            };
            t.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", s).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION) : s()
        } else e && e()
    },
    n.prototype.handleUpdate = function() {
        this.options.backdrop && this.adjustBackdrop(),
        this.adjustDialog()
    },
    n.prototype.adjustBackdrop = function() {
        this.$backdrop.css("height", 0).css("height", this.$element[0].scrollHeight)
    },
    n.prototype.adjustDialog = function() {
        var t = this.$element[0].scrollHeight > document.documentElement.clientHeight;
        this.$element.css({
            paddingLeft: !this.bodyIsOverflowing && t ? this.scrollbarWidth: "",
            paddingRight: this.bodyIsOverflowing && !t ? this.scrollbarWidth: ""
        })
    },
    n.prototype.resetAdjustments = function() {
        this.$element.css({
            paddingLeft: "",
            paddingRight: ""
        })
    },
    n.prototype.checkScrollbar = function() {
        this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight,
        this.scrollbarWidth = this.measureScrollbar()
    },
    n.prototype.setScrollbar = function() {
        var t = parseInt(this.$body.css("padding-right") || 0, 10);
        this.bodyIsOverflowing && this.$body.css("padding-right", t + this.scrollbarWidth)
    },
    n.prototype.resetScrollbar = function() {
        this.$body.css("padding-right", "")
    },
    n.prototype.measureScrollbar = function() {
        var t = document.createElement("div");
        t.className = "modal-scrollbar-measure",
        this.$body.append(t);
        var e = t.offsetWidth - t.clientWidth;
        return this.$body[0].removeChild(t),
        e
    };
    var i = t.fn.modal;
    t.fn.modal = e,
    t.fn.modal.Constructor = n,
    t.fn.modal.noConflict = function() {
        return t.fn.modal = i,
        this
    },
    t(document).on("click.bs.modal.data-api", '[data-toggle="modal"]',
    function(n) {
        var i = t(this),
        r = i.attr("href"),
        o = t(i.attr("data-target") || r && r.replace(/.*(?=#[^\s]+$)/, "")),
        s = o.data("bs.modal") ? "toggle": t.extend({
            remote: !/#/.test(r) && r
        },
        o.data(), i.data());
        i.is("a") && n.preventDefault(),
        o.one("show.bs.modal",
        function(t) {
            t.isDefaultPrevented() || o.one("hidden.bs.modal",
            function() {
                i.is(":visible") && i.trigger("focus")
            })
        }),
        e.call(o, s, this)
    })
} (jQuery),
+
function(t) {
    "use strict";
    function e(e) {
        return this.each(function() {
            var i = t(this),
            r = i.data("bs.tooltip"),
            o = "object" == typeof e && e; (r || "destroy" != e) && (r || i.data("bs.tooltip", r = new n(this, o)), "string" == typeof e && r[e]())
        })
    }
    var n = function(t, e) {
        this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null,
        this.init("tooltip", t, e)
    };
    n.VERSION = "3.3.2",
    n.TRANSITION_DURATION = 150,
    n.DEFAULTS = {
        animation: !0,
        placement: "top",
        selector: !1,
        template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
        trigger: "hover focus",
        title: "",
        delay: 0,
        html: !1,
        container: !1,
        viewport: {
            selector: "body",
            padding: 0
        }
    },
    n.prototype.init = function(e, n, i) {
        this.enabled = !0,
        this.type = e,
        this.$element = t(n),
        this.options = this.getOptions(i),
        this.$viewport = this.options.viewport && t(this.options.viewport.selector || this.options.viewport);
        for (var r = this.options.trigger.split(" "), o = r.length; o--;) {
            var s = r[o];
            if ("click" == s) this.$element.on("click." + this.type, this.options.selector, t.proxy(this.toggle, this));
            else if ("manual" != s) {
                var a = "hover" == s ? "mouseenter": "focusin",
                l = "hover" == s ? "mouseleave": "focusout";
                this.$element.on(a + "." + this.type, this.options.selector, t.proxy(this.enter, this)),
                this.$element.on(l + "." + this.type, this.options.selector, t.proxy(this.leave, this))
            }
        }
        this.options.selector ? this._options = t.extend({},
        this.options, {
            trigger: "manual",
            selector: ""
        }) : this.fixTitle()
    },
    n.prototype.getDefaults = function() {
        return n.DEFAULTS
    },
    n.prototype.getOptions = function(e) {
        return e = t.extend({},
        this.getDefaults(), this.$element.data(), e),
        e.delay && "number" == typeof e.delay && (e.delay = {
            show: e.delay,
            hide: e.delay
        }),
        e
    },
    n.prototype.getDelegateOptions = function() {
        var e = {},
        n = this.getDefaults();
        return this._options && t.each(this._options,
        function(t, i) {
            n[t] != i && (e[t] = i)
        }),
        e
    },
    n.prototype.enter = function(e) {
        var n = e instanceof this.constructor ? e: t(e.currentTarget).data("bs." + this.type);
        return n && n.$tip && n.$tip.is(":visible") ? void(n.hoverState = "in") : (n || (n = new this.constructor(e.currentTarget, this.getDelegateOptions()), t(e.currentTarget).data("bs." + this.type, n)), clearTimeout(n.timeout), n.hoverState = "in", n.options.delay && n.options.delay.show ? void(n.timeout = setTimeout(function() {
            "in" == n.hoverState && n.show()
        },
        n.options.delay.show)) : n.show())
    },
    n.prototype.leave = function(e) {
        var n = e instanceof this.constructor ? e: t(e.currentTarget).data("bs." + this.type);
        return n || (n = new this.constructor(e.currentTarget, this.getDelegateOptions()), t(e.currentTarget).data("bs." + this.type, n)),
        clearTimeout(n.timeout),
        n.hoverState = "out",
        n.options.delay && n.options.delay.hide ? void(n.timeout = setTimeout(function() {
            "out" == n.hoverState && n.hide()
        },
        n.options.delay.hide)) : n.hide()
    },
    n.prototype.show = function() {
        var e = t.Event("show.bs." + this.type);
        if (this.hasContent() && this.enabled) {
            this.$element.trigger(e);
            var i = t.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);
            if (e.isDefaultPrevented() || !i) return;
            var r = this,
            o = this.tip(),
            s = this.getUID(this.type);
            this.setContent(),
            o.attr("id", s),
            this.$element.attr("aria-describedby", s),
            this.options.animation && o.addClass("fade");
            var a = "function" == typeof this.options.placement ? this.options.placement.call(this, o[0], this.$element[0]) : this.options.placement,
            l = /\s?auto?\s?/i,
            u = l.test(a);
            u && (a = a.replace(l, "") || "top"),
            o.detach().css({
                top: 0,
                left: 0,
                display: "block"
            }).addClass(a).data("bs." + this.type, this),
            this.options.container ? o.appendTo(this.options.container) : o.insertAfter(this.$element);
            var c = this.getPosition(),
            d = o[0].offsetWidth,
            h = o[0].offsetHeight;
            if (u) {
                var p = a,
                f = this.options.container ? t(this.options.container) : this.$element.parent(),
                m = this.getPosition(f);
                a = "bottom" == a && c.bottom + h > m.bottom ? "top": "top" == a && c.top - h < m.top ? "bottom": "right" == a && c.right + d > m.width ? "left": "left" == a && c.left - d < m.left ? "right": a,
                o.removeClass(p).addClass(a)
            }
            var g = this.getCalculatedOffset(a, c, d, h);
            this.applyPlacement(g, a);
            var v = function() {
                var t = r.hoverState;
                r.$element.trigger("shown.bs." + r.type),
                r.hoverState = null,
                "out" == t && r.leave(r)
            };
            t.support.transition && this.$tip.hasClass("fade") ? o.one("bsTransitionEnd", v).emulateTransitionEnd(n.TRANSITION_DURATION) : v()
        }
    },
    n.prototype.applyPlacement = function(e, n) {
        var i = this.tip(),
        r = i[0].offsetWidth,
        o = i[0].offsetHeight,
        s = parseInt(i.css("margin-top"), 10),
        a = parseInt(i.css("margin-left"), 10);
        isNaN(s) && (s = 0),
        isNaN(a) && (a = 0),
        e.top = e.top + s,
        e.left = e.left + a,
        t.offset.setOffset(i[0], t.extend({
            using: function(t) {
                i.css({
                    top: Math.round(t.top),
                    left: Math.round(t.left)
                })
            }
        },
        e), 0),
        i.addClass("in");
        var l = i[0].offsetWidth,
        u = i[0].offsetHeight;
        "top" == n && u != o && (e.top = e.top + o - u);
        var c = this.getViewportAdjustedDelta(n, e, l, u);
        c.left ? e.left += c.left: e.top += c.top;
        var d = /top|bottom/.test(n),
        h = d ? 2 * c.left - r + l: 2 * c.top - o + u,
        p = d ? "offsetWidth": "offsetHeight";
        i.offset(e),
        this.replaceArrow(h, i[0][p], d)
    },
    n.prototype.replaceArrow = function(t, e, n) {
        this.arrow().css(n ? "left": "top", 50 * (1 - t / e) + "%").css(n ? "top": "left", "")
    },
    n.prototype.setContent = function() {
        var t = this.tip(),
        e = this.getTitle();
        t.find(".tooltip-inner")[this.options.html ? "html": "text"](e),
        t.removeClass("fade in top bottom left right")
    },
    n.prototype.hide = function(e) {
        function i() {
            "in" != r.hoverState && o.detach(),
            r.$element.removeAttr("aria-describedby").trigger("hidden.bs." + r.type),
            e && e()
        }
        var r = this,
        o = this.tip(),
        s = t.Event("hide.bs." + this.type);
        return this.$element.trigger(s),
        s.isDefaultPrevented() ? void 0 : (o.removeClass("in"), t.support.transition && this.$tip.hasClass("fade") ? o.one("bsTransitionEnd", i).emulateTransitionEnd(n.TRANSITION_DURATION) : i(), this.hoverState = null, this)
    },
    n.prototype.fixTitle = function() {
        var t = this.$element; (t.attr("title") || "string" != typeof t.attr("data-original-title")) && t.attr("data-original-title", t.attr("title") || "").attr("title", "")
    },
    n.prototype.hasContent = function() {
        return this.getTitle()
    },
    n.prototype.getPosition = function(e) {
        e = e || this.$element;
        var n = e[0],
        i = "BODY" == n.tagName,
        r = n.getBoundingClientRect();
        null == r.width && (r = t.extend({},
        r, {
            width: r.right - r.left,
            height: r.bottom - r.top
        }));
        var o = i ? {
            top: 0,
            left: 0
        }: e.offset(),
        s = {
            scroll: i ? document.documentElement.scrollTop || document.body.scrollTop: e.scrollTop()
        },
        a = i ? {
            width: t(window).width(),
            height: t(window).height()
        }: null;
        return t.extend({},
        r, s, a, o)
    },
    n.prototype.getCalculatedOffset = function(t, e, n, i) {
        return "bottom" == t ? {
            top: e.top + e.height,
            left: e.left + e.width / 2 - n / 2
        }: "top" == t ? {
            top: e.top - i,
            left: e.left + e.width / 2 - n / 2
        }: "left" == t ? {
            top: e.top + e.height / 2 - i / 2,
            left: e.left - n
        }: {
            top: e.top + e.height / 2 - i / 2,
            left: e.left + e.width
        }
    },
    n.prototype.getViewportAdjustedDelta = function(t, e, n, i) {
        var r = {
            top: 0,
            left: 0
        };
        if (!this.$viewport) return r;
        var o = this.options.viewport && this.options.viewport.padding || 0,
        s = this.getPosition(this.$viewport);
        if (/right|left/.test(t)) {
            var a = e.top - o - s.scroll,
            l = e.top + o - s.scroll + i;
            a < s.top ? r.top = s.top - a: l > s.top + s.height && (r.top = s.top + s.height - l)
        } else {
            var u = e.left - o,
            c = e.left + o + n;
            u < s.left ? r.left = s.left - u: c > s.width && (r.left = s.left + s.width - c)
        }
        return r
    },
    n.prototype.getTitle = function() {
        var t, e = this.$element,
        n = this.options;
        return t = e.attr("data-original-title") || ("function" == typeof n.title ? n.title.call(e[0]) : n.title)
    },
    n.prototype.getUID = function(t) {
        do t += ~~ (1e6 * Math.random());
        while (document.getElementById(t));
        return t
    },
    n.prototype.tip = function() {
        return this.$tip = this.$tip || t(this.options.template)
    },
    n.prototype.arrow = function() {
        return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
    },
    n.prototype.enable = function() {
        this.enabled = !0
    },
    n.prototype.disable = function() {
        this.enabled = !1
    },
    n.prototype.toggleEnabled = function() {
        this.enabled = !this.enabled
    },
    n.prototype.toggle = function(e) {
        var n = this;
        e && (n = t(e.currentTarget).data("bs." + this.type), n || (n = new this.constructor(e.currentTarget, this.getDelegateOptions()), t(e.currentTarget).data("bs." + this.type, n))),
        n.tip().hasClass("in") ? n.leave(n) : n.enter(n)
    },
    n.prototype.destroy = function() {
        var t = this;
        clearTimeout(this.timeout),
        this.hide(function() {
            t.$element.off("." + t.type).removeData("bs." + t.type)
        })
    };
    var i = t.fn.tooltip;
    t.fn.tooltip = e,
    t.fn.tooltip.Constructor = n,
    t.fn.tooltip.noConflict = function() {
        return t.fn.tooltip = i,
        this
    }
} (jQuery),
+
function(t) {
    "use strict";
    function e(e) {
        return this.each(function() {
            var i = t(this),
            r = i.data("bs.popover"),
            o = "object" == typeof e && e; (r || "destroy" != e) && (r || i.data("bs.popover", r = new n(this, o)), "string" == typeof e && r[e]())
        })
    }
    var n = function(t, e) {
        this.init("popover", t, e)
    };
    if (!t.fn.tooltip) throw new Error("Popover requires tooltip.js");
    n.VERSION = "3.3.2",
    n.DEFAULTS = t.extend({},
    t.fn.tooltip.Constructor.DEFAULTS, {
        placement: "right",
        trigger: "click",
        content: "",
        template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
    }),
    n.prototype = t.extend({},
    t.fn.tooltip.Constructor.prototype),
    n.prototype.constructor = n,
    n.prototype.getDefaults = function() {
        return n.DEFAULTS
    },
    n.prototype.setContent = function() {
        var t = this.tip(),
        e = this.getTitle(),
        n = this.getContent();
        t.find(".popover-title")[this.options.html ? "html": "text"](e),
        t.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof n ? "html": "append": "text"](n),
        t.removeClass("fade top bottom left right in"),
        t.find(".popover-title").html() || t.find(".popover-title").hide()
    },
    n.prototype.hasContent = function() {
        return this.getTitle() || this.getContent()
    },
    n.prototype.getContent = function() {
        var t = this.$element,
        e = this.options;
        return t.attr("data-content") || ("function" == typeof e.content ? e.content.call(t[0]) : e.content)
    },
    n.prototype.arrow = function() {
        return this.$arrow = this.$arrow || this.tip().find(".arrow")
    },
    n.prototype.tip = function() {
        return this.$tip || (this.$tip = t(this.options.template)),
        this.$tip
    };
    var i = t.fn.popover;
    t.fn.popover = e,
    t.fn.popover.Constructor = n,
    t.fn.popover.noConflict = function() {
        return t.fn.popover = i,
        this
    }
} (jQuery),
+
function(t) {
    "use strict";
    function e(n, i) {
        var r = t.proxy(this.process, this);
        this.$body = t("body"),
        this.$scrollElement = t(t(n).is("body") ? window: n),
        this.options = t.extend({},
        e.DEFAULTS, i),
        this.selector = (this.options.target || "") + " .nav li > a",
        this.offsets = [],
        this.targets = [],
        this.activeTarget = null,
        this.scrollHeight = 0,
        this.$scrollElement.on("scroll.bs.scrollspy", r),
        this.refresh(),
        this.process()
    }
    function n(n) {
        return this.each(function() {
            var i = t(this),
            r = i.data("bs.scrollspy"),
            o = "object" == typeof n && n;
            r || i.data("bs.scrollspy", r = new e(this, o)),
            "string" == typeof n && r[n]()
        })
    }
    e.VERSION = "3.3.2",
    e.DEFAULTS = {
        offset: 10
    },
    e.prototype.getScrollHeight = function() {
        return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
    },
    e.prototype.refresh = function() {
        var e = "offset",
        n = 0;
        t.isWindow(this.$scrollElement[0]) || (e = "position", n = this.$scrollElement.scrollTop()),
        this.offsets = [],
        this.targets = [],
        this.scrollHeight = this.getScrollHeight();
        var i = this;
        this.$body.find(this.selector).map(function() {
            var i = t(this),
            r = i.data("target") || i.attr("href"),
            o = /^#./.test(r) && t(r);
            return o && o.length && o.is(":visible") && [[o[e]().top + n, r]] || null
        }).sort(function(t, e) {
            return t[0] - e[0]
        }).each(function() {
            i.offsets.push(this[0]),
            i.targets.push(this[1])
        })
    },
    e.prototype.process = function() {
        var t, e = this.$scrollElement.scrollTop() + this.options.offset,
        n = this.getScrollHeight(),
        i = this.options.offset + n - this.$scrollElement.height(),
        r = this.offsets,
        o = this.targets,
        s = this.activeTarget;
        if (this.scrollHeight != n && this.refresh(), e >= i) return s != (t = o[o.length - 1]) && this.activate(t);
        if (s && e < r[0]) return this.activeTarget = null,
        this.clear();
        for (t = r.length; t--;) s != o[t] && e >= r[t] && (!r[t + 1] || e <= r[t + 1]) && this.activate(o[t])
    },
    e.prototype.activate = function(e) {
        this.activeTarget = e,
        this.clear();
        var n = this.selector + '[data-target="' + e + '"],' + this.selector + '[href="' + e + '"]',
        i = t(n).parents("li").addClass("active");
        i.parent(".dropdown-menu").length && (i = i.closest("li.dropdown").addClass("active")),
        i.trigger("activate.bs.scrollspy")
    },
    e.prototype.clear = function() {
        t(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")
    };
    var i = t.fn.scrollspy;
    t.fn.scrollspy = n,
    t.fn.scrollspy.Constructor = e,
    t.fn.scrollspy.noConflict = function() {
        return t.fn.scrollspy = i,
        this
    },
    t(window).on("load.bs.scrollspy.data-api",
    function() {
        t('[data-spy="scroll"]').each(function() {
            var e = t(this);
            n.call(e, e.data())
        })
    })
} (jQuery),
+
function(t) {
    "use strict";
    function e(e) {
        return this.each(function() {
            var i = t(this),
            r = i.data("bs.tab");
            r || i.data("bs.tab", r = new n(this)),
            "string" == typeof e && r[e]()
        })
    }
    var n = function(e) {
        this.element = t(e)
    };
    n.VERSION = "3.3.2",
    n.TRANSITION_DURATION = 150,
    n.prototype.show = function() {
        var e = this.element,
        n = e.closest("ul:not(.dropdown-menu)"),
        i = e.data("target");
        if (i || (i = e.attr("href"), i = i && i.replace(/.*(?=#[^\s]*$)/, "")), !e.parent("li").hasClass("active")) {
            var r = n.find(".active:last a"),
            o = t.Event("hide.bs.tab", {
                relatedTarget: e[0]
            }),
            s = t.Event("show.bs.tab", {
                relatedTarget: r[0]
            });
            if (r.trigger(o), e.trigger(s), !s.isDefaultPrevented() && !o.isDefaultPrevented()) {
                var a = t(i);
                this.activate(e.closest("li"), n),
                this.activate(a, a.parent(),
                function() {
                    r.trigger({
                        type: "hidden.bs.tab",
                        relatedTarget: e[0]
                    }),
                    e.trigger({
                        type: "shown.bs.tab",
                        relatedTarget: r[0]
                    })
                })
            }
        }
    },
    n.prototype.activate = function(e, i, r) {
        function o() {
            s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1),
            e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0),
            a ? (e[0].offsetWidth, e.addClass("in")) : e.removeClass("fade"),
            e.parent(".dropdown-menu") && e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0),
            r && r()
        }
        var s = i.find("> .active"),
        a = r && t.support.transition && (s.length && s.hasClass("fade") || !!i.find("> .fade").length);
        s.length && a ? s.one("bsTransitionEnd", o).emulateTransitionEnd(n.TRANSITION_DURATION) : o(),
        s.removeClass("in")
    };
    var i = t.fn.tab;
    t.fn.tab = e,
    t.fn.tab.Constructor = n,
    t.fn.tab.noConflict = function() {
        return t.fn.tab = i,
        this
    };
    var r = function(n) {
        n.preventDefault(),
        e.call(t(this), "show")
    };
    t(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', r).on("click.bs.tab.data-api", '[data-toggle="pill"]', r)
} (jQuery),
+
function(t) {
    "use strict";
    function e(e) {
        return this.each(function() {
            var i = t(this),
            r = i.data("bs.affix"),
            o = "object" == typeof e && e;
            r || i.data("bs.affix", r = new n(this, o)),
            "string" == typeof e && r[e]()
        })
    }
    var n = function(e, i) {
        this.options = t.extend({},
        n.DEFAULTS, i),
        this.$target = t(this.options.target).on("scroll.bs.affix.data-api", t.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", t.proxy(this.checkPositionWithEventLoop, this)),
        this.$element = t(e),
        this.affixed = this.unpin = this.pinnedOffset = null,
        this.checkPosition()
    };
    n.VERSION = "3.3.2",
    n.RESET = "affix affix-top affix-bottom",
    n.DEFAULTS = {
        offset: 0,
        target: window
    },
    n.prototype.getState = function(t, e, n, i) {
        var r = this.$target.scrollTop(),
        o = this.$element.offset(),
        s = this.$target.height();
        if (null != n && "top" == this.affixed) return n > r ? "top": !1;
        if ("bottom" == this.affixed) return null != n ? r + this.unpin <= o.top ? !1 : "bottom": t - i >= r + s ? !1 : "bottom";
        var a = null == this.affixed,
        l = a ? r: o.top,
        u = a ? s: e;
        return null != n && n >= r ? "top": null != i && l + u >= t - i ? "bottom": !1
    },
    n.prototype.getPinnedOffset = function() {
        if (this.pinnedOffset) return this.pinnedOffset;
        this.$element.removeClass(n.RESET).addClass("affix");
        var t = this.$target.scrollTop(),
        e = this.$element.offset();
        return this.pinnedOffset = e.top - t
    },
    n.prototype.checkPositionWithEventLoop = function() {
        setTimeout(t.proxy(this.checkPosition, this), 1)
    },
    n.prototype.checkPosition = function() {
        if (this.$element.is(":visible")) {
            var e = this.$element.height(),
            i = this.options.offset,
            r = i.top,
            o = i.bottom,
            s = t("body").height();
            "object" != typeof i && (o = r = i),
            "function" == typeof r && (r = i.top(this.$element)),
            "function" == typeof o && (o = i.bottom(this.$element));
            var a = this.getState(s, e, r, o);
            if (this.affixed != a) {
                null != this.unpin && this.$element.css("top", "");
                var l = "affix" + (a ? "-" + a: ""),
                u = t.Event(l + ".bs.affix");
                if (this.$element.trigger(u), u.isDefaultPrevented()) return;
                this.affixed = a,
                this.unpin = "bottom" == a ? this.getPinnedOffset() : null,
                this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix", "affixed") + ".bs.affix")
            }
            "bottom" == a && this.$element.offset({
                top: s - e - o
            })
        }
    };
    var i = t.fn.affix;
    t.fn.affix = e,
    t.fn.affix.Constructor = n,
    t.fn.affix.noConflict = function() {
        return t.fn.affix = i,
        this
    },
    t(window).on("load",
    function() {
        t('[data-spy="affix"]').each(function() {
            var n = t(this),
            i = n.data();
            i.offset = i.offset || {},
            null != i.offsetBottom && (i.offset.bottom = i.offsetBottom),
            null != i.offsetTop && (i.offset.top = i.offsetTop),
            e.call(n, i)
        })
    })
} (jQuery),
/*!
 * Bootstrap-select v1.6.2 (http://silviomoreto.github.io/bootstrap-select/)
 *
 * Copyright 2013-2014 bootstrap-select
 * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
 */
!
function(t) {
    "use strict";
    function e(t, e) {
        return t.toUpperCase().indexOf(e.toUpperCase()) > -1
    }
    function n(e) {
        var n = [{
            re: /[\xC0-\xC6]/g,
            ch: "A"
        },
        {
            re: /[\xE0-\xE6]/g,
            ch: "a"
        },
        {
            re: /[\xC8-\xCB]/g,
            ch: "E"
        },
        {
            re: /[\xE8-\xEB]/g,
            ch: "e"
        },
        {
            re: /[\xCC-\xCF]/g,
            ch: "I"
        },
        {
            re: /[\xEC-\xEF]/g,
            ch: "i"
        },
        {
            re: /[\xD2-\xD6]/g,
            ch: "O"
        },
        {
            re: /[\xF2-\xF6]/g,
            ch: "o"
        },
        {
            re: /[\xD9-\xDC]/g,
            ch: "U"
        },
        {
            re: /[\xF9-\xFC]/g,
            ch: "u"
        },
        {
            re: /[\xC7-\xE7]/g,
            ch: "c"
        },
        {
            re: /[\xD1]/g,
            ch: "N"
        },
        {
            re: /[\xF1]/g,
            ch: "n"
        }];
        return t.each(n,
        function() {
            e = e.replace(this.re, this.ch)
        }),
        e
    }
    function i(t) {
        var e = {
            "&": "&amp;",
            "<": "&lt;",
            ">": "&gt;",
            '"': "&quot;",
            "'": "&#x27;",
            "`": "&#x60;"
        },
        n = "(?:" + Object.keys(e).join("|") + ")",
        i = new RegExp(n),
        r = new RegExp(n, "g"),
        o = null == t ? "": "" + t;
        return i.test(o) ? o.replace(r,
        function(t) {
            return e[t]
        }) : o
    }
    function r(e, n) {
        var i = arguments,
        r = e,
        e = i[0],
        n = i[1]; [].shift.apply(i),
        "undefined" == typeof e && (e = r);
        var s, a = this.each(function() {
            var r = t(this);
            if (r.is("select")) {
                var a = r.data("selectpicker"),
                l = "object" == typeof e && e;
                if (a) {
                    if (l) for (var u in l) l.hasOwnProperty(u) && (a.options[u] = l[u])
                } else {
                    var c = t.extend({},
                    o.DEFAULTS, t.fn.selectpicker.defaults || {},
                    r.data(), l);
                    r.data("selectpicker", a = new o(this, c, n))
                }
                "string" == typeof e && (s = a[e] instanceof Function ? a[e].apply(a, i) : a.options[e])
            }
        });
        return "undefined" != typeof s ? s: a
    }
    t.expr[":"].icontains = function(n, i, r) {
        return e(t(n).text(), r[3])
    },
    t.expr[":"].aicontains = function(n, i, r) {
        return e(t(n).data("normalizedText") || t(n).text(), r[3])
    };
    var o = function(e, n, i) {
        i && (i.stopPropagation(), i.preventDefault()),
        this.$element = t(e),
        this.$newElement = null,
        this.$button = null,
        this.$menu = null,
        this.$lis = null,
        this.options = n,
        null === this.options.title && (this.options.title = this.$element.attr("title")),
        this.val = o.prototype.val,
        this.render = o.prototype.render,
        this.refresh = o.prototype.refresh,
        this.setStyle = o.prototype.setStyle,
        this.selectAll = o.prototype.selectAll,
        this.deselectAll = o.prototype.deselectAll,
        this.destroy = o.prototype.remove,
        this.remove = o.prototype.remove,
        this.show = o.prototype.show,
        this.hide = o.prototype.hide,
        this.init()
    };
    o.VERSION = "1.6.2",
    o.DEFAULTS = {
        noneSelectedText: "Nothing selected",
        noneResultsText: "No results match",
        countSelectedText: function(t) {
            return 1 == t ? "{0} item selected": "{0} items selected"
        },
        maxOptionsText: function(t, e) {
            var n = [];
            return n[0] = 1 == t ? "Limit reached ({n} item max)": "Limit reached ({n} items max)",
            n[1] = 1 == e ? "Group limit reached ({n} item max)": "Group limit reached ({n} items max)",
            n
        },
        selectAllText: "Select All",
        deselectAllText: "Deselect All",
        multipleSeparator: ", ",
        style: "btn-default",
        size: "auto",
        title: null,
        selectedTextFormat: "values",
        width: !1,
        container: !1,
        hideDisabled: !1,
        showSubtext: !1,
        showIcon: !0,
        showContent: !0,
        dropupAuto: !0,
        header: !1,
        liveSearch: !1,
        actionsBox: !1,
        iconBase: "glyphicon",
        tickIcon: "glyphicon-ok",
        maxOptions: !1,
        mobile: !1,
        selectOnTab: !1,
        dropdownAlignRight: !1,
        searchAccentInsensitive: !1
    },
    o.prototype = {
        constructor: o,
        init: function() {
            var e = this,
            n = this.$element.attr("id");
            this.$element.hide(),
            this.multiple = this.$element.prop("multiple"),
            this.autofocus = this.$element.prop("autofocus"),
            this.$newElement = this.createView(),
            this.$element.after(this.$newElement),
            this.$menu = this.$newElement.find("> .dropdown-menu"),
            this.$button = this.$newElement.find("> button"),
            this.$searchbox = this.$newElement.find("input"),
            this.options.dropdownAlignRight && this.$menu.addClass("dropdown-menu-right"),
            "undefined" != typeof n && (this.$button.attr("data-id", n), t('label[for="' + n + '"]').click(function(t) {
                t.preventDefault(),
                e.$button.focus()
            })),
            this.checkDisabled(),
            this.clickListener(),
            this.options.liveSearch && this.liveSearchListener(),
            this.render(),
            this.liHeight(),
            this.setStyle(),
            this.setWidth(),
            this.options.container && this.selectPosition(),
            this.$menu.data("this", this),
            this.$newElement.data("this", this),
            this.options.mobile && this.mobile()
        },
        createDropdown: function() {
            var e = this.multiple ? " show-tick": "",
            n = this.$element.parent().hasClass("input-group") ? " input-group-btn": "",
            i = this.autofocus ? " autofocus": "",
            r = this.$element.parents().hasClass("form-group-lg") ? " btn-lg": this.$element.parents().hasClass("form-group-sm") ? " btn-sm": "",
            o = this.options.header ? '<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;</button>' + this.options.header + "</div>": "",
            s = this.options.liveSearch ? '<div class="bs-searchbox"><input type="text" class="input-block-level form-control" autocomplete="off" /></div>': "",
            a = this.options.actionsBox ? '<div class="bs-actionsbox"><div class="btn-group btn-block"><button class="actions-btn bs-select-all btn btn-sm btn-default">' + this.options.selectAllText + '</button><button class="actions-btn bs-deselect-all btn btn-sm btn-default">' + this.options.deselectAllText + "</button></div></div>": "",
            l = '<div class="btn-group bootstrap-select' + e + n + '"><button type="button" class="btn dropdown-toggle selectpicker' + r + '" data-toggle="dropdown"' + i + '><span class="filter-option pull-left"></span>&nbsp;<span class="caret"></span></button><div class="dropdown-menu open">' + o + s + a + '<ul class="dropdown-menu inner selectpicker" role="menu"></ul></div></div>';
            return t(l)
        },
        createView: function() {
            var t = this.createDropdown(),
            e = this.createLi();
            return t.find("ul").append(e),
            t
        },
        reloadLi: function() {
            this.destroyLi();
            var t = this.createLi();
            this.$menu.find("ul").append(t)
        },
        destroyLi: function() {
            this.$menu.find("li").remove()
        },
        createLi: function() {
            var e = this,
            r = [],
            o = 0,
            s = function(t, e, n) {
                return "<li" + ("undefined" != typeof n ? ' class="' + n + '"': "") + ("undefined" != typeof e | null === e ? ' data-original-index="' + e + '"': "") + ">" + t + "</li>"
            },
            a = function(t, r, o, s) {
                var a = n(i(t));
                return '<a tabindex="0"' + ("undefined" != typeof r ? ' class="' + r + '"': "") + ("undefined" != typeof o ? ' style="' + o + '"': "") + ("undefined" != typeof s ? 'data-optgroup="' + s + '"': "") + ' data-normalized-text="' + a + '">' + t + '<span class="' + e.options.iconBase + " " + e.options.tickIcon + ' check-mark"></span></a>'
            };
            return this.$element.find("option").each(function() {
                var n = t(this),
                i = n.attr("class") || "",
                l = n.attr("style"),
                u = n.data("content") ? n.data("content") : n.html(),
                c = "undefined" != typeof n.data("subtext") ? '<small class="muted text-muted">' + n.data("subtext") + "</small>": "",
                d = "undefined" != typeof n.data("icon") ? '<span class="' + e.options.iconBase + " " + n.data("icon") + '"></span> ': "",
                h = n.is(":disabled") || n.parent().is(":disabled"),
                p = n[0].index;
                if ("" !== d && h && (d = "<span>" + d + "</span>"), n.data("content") || (u = d + '<span class="text">' + u + c + "</span>"), !e.options.hideDisabled || !h) if (n.parent().is("optgroup") && n.data("divider") !== !0) {
                    if (0 === n.index()) {
                        o += 1;
                        var f = n.parent().attr("label"),
                        m = "undefined" != typeof n.parent().data("subtext") ? '<small class="muted text-muted">' + n.parent().data("subtext") + "</small>": "",
                        g = n.parent().data("icon") ? '<span class="' + e.options.iconBase + " " + n.parent().data("icon") + '"></span> ': "";
                        f = g + '<span class="text">' + f + m + "</span>",
                        0 !== p && r.length > 0 && r.push(s("", null, "divider")),
                        r.push(s(f, null, "dropdown-header"))
                    }
                    r.push(s(a(u, "opt " + i, l, o), p))
                } else r.push(n.data("divider") === !0 ? s("", p, "divider") : n.data("hidden") === !0 ? s(a(u, i, l), p, "hide is-hidden") : s(a(u, i, l), p))
            }),
            this.multiple || 0 !== this.$element.find("option:selected").length || this.options.title || this.$element.find("option").eq(0).prop("selected", !0).attr("selected", "selected"),
            t(r.join(""))
        },
        findLis: function() {
            return null == this.$lis && (this.$lis = this.$menu.find("li")),
            this.$lis
        },
        render: function(e) {
            var n = this;
            e !== !1 && this.$element.find("option").each(function(e) {
                n.setDisabled(e, t(this).is(":disabled") || t(this).parent().is(":disabled")),
                n.setSelected(e, t(this).is(":selected"))
            }),
            this.tabIndex();
            var r = this.options.hideDisabled ? ":not([disabled])": "",
            o = this.$element.find("option:selected" + r).map(function() {
                var e, i = t(this),
                r = i.data("icon") && n.options.showIcon ? '<i class="' + n.options.iconBase + " " + i.data("icon") + '"></i> ': "";
                return e = n.options.showSubtext && i.attr("data-subtext") && !n.multiple ? ' <small class="muted text-muted">' + i.data("subtext") + "</small>": "",
                i.data("content") && n.options.showContent ? i.data("content") : "undefined" != typeof i.attr("title") ? i.attr("title") : r + i.html() + e
            }).toArray(),
            s = this.multiple ? o.join(this.options.multipleSeparator) : o[0];
            if (this.multiple && this.options.selectedTextFormat.indexOf("count") > -1) {
                var a = this.options.selectedTextFormat.split(">");
                if (a.length > 1 && o.length > a[1] || 1 == a.length && o.length >= 2) {
                    r = this.options.hideDisabled ? ", [disabled]": "";
                    var l = this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]' + r).length,
                    u = "function" == typeof this.options.countSelectedText ? this.options.countSelectedText(o.length, l) : this.options.countSelectedText;
                    s = u.replace("{0}", o.length.toString()).replace("{1}", l.toString())
                }
            }
            this.options.title = this.$element.attr("title"),
            "static" == this.options.selectedTextFormat && (s = this.options.title),
            s || (s = "undefined" != typeof this.options.title ? this.options.title: this.options.noneSelectedText),
            this.$button.attr("title", i(s)),
            this.$newElement.find(".filter-option").html(s)
        },
        setStyle: function(t, e) {
            this.$element.attr("class") && this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|validate\[.*\]/gi, ""));
            var n = t ? t: this.options.style;
            "add" == e ? this.$button.addClass(n) : "remove" == e ? this.$button.removeClass(n) : (this.$button.removeClass(this.options.style), this.$button.addClass(n))
        },
        liHeight: function() {
            if (this.options.size !== !1) {
                var t = this.$menu.parent().clone().find("> .dropdown-toggle").prop("autofocus", !1).end().appendTo("body"),
                e = t.addClass("open").find("> .dropdown-menu"),
                n = e.find("li").not(".divider").not(".dropdown-header").filter(":visible").children("a").outerHeight(),
                i = this.options.header ? e.find(".popover-title").outerHeight() : 0,
                r = this.options.liveSearch ? e.find(".bs-searchbox").outerHeight() : 0,
                o = this.options.actionsBox ? e.find(".bs-actionsbox").outerHeight() : 0;
                t.remove(),
                this.$newElement.data("liHeight", n).data("headerHeight", i).data("searchHeight", r).data("actionsHeight", o)
            }
        },
        setSize: function() {
            this.findLis();
            var e, n, i, r = this,
            o = this.$menu,
            s = o.find(".inner"),
            a = this.$newElement.outerHeight(),
            l = this.$newElement.data("liHeight"),
            u = this.$newElement.data("headerHeight"),
            c = this.$newElement.data("searchHeight"),
            d = this.$newElement.data("actionsHeight"),
            h = this.$lis.filter(".divider").outerHeight(!0),
            p = parseInt(o.css("padding-top")) + parseInt(o.css("padding-bottom")) + parseInt(o.css("border-top-width")) + parseInt(o.css("border-bottom-width")),
            f = this.options.hideDisabled ? ", .disabled": "",
            m = t(window),
            g = p + parseInt(o.css("margin-top")) + parseInt(o.css("margin-bottom")) + 2,
            v = function() {
                n = r.$newElement.offset().top - m.scrollTop(),
                i = m.height() - n - a
            };
            if (v(), this.options.header && o.css("padding-top", 0), "auto" == this.options.size) {
                var y = function() {
                    var t, a = r.$lis.not(".hide");
                    v(),
                    e = i - g,
                    r.options.dropupAuto && r.$newElement.toggleClass("dropup", n > i && e - g < o.height()),
                    r.$newElement.hasClass("dropup") && (e = n - g),
                    t = a.length + a.filter(".dropdown-header").length > 3 ? 3 * l + g - 2 : 0,
                    o.css({
                        "max-height": e + "px",
                        overflow: "hidden",
                        "min-height": t + u + c + d + "px"
                    }),
                    s.css({
                        "max-height": e - u - c - d - p + "px",
                        "overflow-y": "auto",
                        "min-height": Math.max(t - p, 0) + "px"
                    })
                };
                y(),
                this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize", y),
                t(window).off("resize.getSize").on("resize.getSize", y),
                t(window).off("scroll.getSize").on("scroll.getSize", y)
            } else if (this.options.size && "auto" != this.options.size && o.find("li" + f).length > this.options.size) {
                var b = this.$lis.not(".divider" + f).find(" > *").slice(0, this.options.size).last().parent().index(),
                w = this.$lis.slice(0, b + 1).filter(".divider").length;
                e = l * this.options.size + w * h + p,
                r.options.dropupAuto && this.$newElement.toggleClass("dropup", n > i && e < o.height()),
                o.css({
                    "max-height": e + u + c + d + "px",
                    overflow: "hidden"
                }),
                s.css({
                    "max-height": e - p + "px",
                    "overflow-y": "auto"
                })
            }
        },
        setWidth: function() {
            if ("auto" == this.options.width) {
                this.$menu.css("min-width", "0");
                var t = this.$newElement.clone().appendTo("body"),
                e = t.find("> .dropdown-menu").css("width"),
                n = t.css("width", "auto").find("> button").css("width");
                t.remove(),
                this.$newElement.css("width", Math.max(parseInt(e), parseInt(n)) + "px")
            } else "fit" == this.options.width ? (this.$menu.css("min-width", ""), this.$newElement.css("width", "").addClass("fit-width")) : this.options.width ? (this.$menu.css("min-width", ""), this.$newElement.css("width", this.options.width)) : (this.$menu.css("min-width", ""), this.$newElement.css("width", ""));
            this.$newElement.hasClass("fit-width") && "fit" !== this.options.width && this.$newElement.removeClass("fit-width")
        },
        selectPosition: function() {
            var e, n, i = this,
            r = "<div />",
            o = t(r),
            s = function(t) {
                o.addClass(t.attr("class").replace(/form-control/gi, "")).toggleClass("dropup", t.hasClass("dropup")),
                e = t.offset(),
                n = t.hasClass("dropup") ? 0 : t[0].offsetHeight,
                o.css({
                    top: e.top + n,
                    left: e.left,
                    width: t[0].offsetWidth,
                    position: "absolute"
                })
            };
            this.$newElement.on("click",
            function() {
                i.isDisabled() || (s(t(this)), o.appendTo(i.options.container), o.toggleClass("open", !t(this).hasClass("open")), o.append(i.$menu))
            }),
            t(window).resize(function() {
                s(i.$newElement)
            }),
            t(window).on("scroll",
            function() {
                s(i.$newElement)
            }),
            t("html").on("click",
            function(e) {
                t(e.target).closest(i.$newElement).length < 1 && o.removeClass("open")
            })
        },
        setSelected: function(t, e) {
            this.findLis(),
            this.$lis.filter('[data-original-index="' + t + '"]').toggleClass("selected", e)
        },
        setDisabled: function(t, e) {
            this.findLis(),
            e ? this.$lis.filter('[data-original-index="' + t + '"]').addClass("disabled").find("a").attr("href", "#").attr("tabindex", -1) : this.$lis.filter('[data-original-index="' + t + '"]').removeClass("disabled").find("a").removeAttr("href").attr("tabindex", 0)
        },
        isDisabled: function() {
            return this.$element.is(":disabled")
        },
        checkDisabled: function() {
            var t = this;
            this.isDisabled() ? this.$button.addClass("disabled").attr("tabindex", -1) : (this.$button.hasClass("disabled") && this.$button.removeClass("disabled"), -1 == this.$button.attr("tabindex") && (this.$element.data("tabindex") || this.$button.removeAttr("tabindex"))),
            this.$button.click(function() {
                return ! t.isDisabled()
            })
        },
        tabIndex: function() {
            this.$element.is("[tabindex]") && (this.$element.data("tabindex", this.$element.attr("tabindex")), this.$button.attr("tabindex", this.$element.data("tabindex")))
        },
        clickListener: function() {
            var e = this;
            this.$newElement.on("touchstart.dropdown", ".dropdown-menu",
            function(t) {
                t.stopPropagation()
            }),
            this.$newElement.on("click",
            function() {
                e.setSize(),
                e.options.liveSearch || e.multiple || setTimeout(function() {
                    e.$menu.find(".selected a").focus()
                },
                10)
            }),
            this.$menu.on("click", "li a",
            function(n) {
                var i = t(this),
                r = i.parent().data("originalIndex"),
                o = e.$element.val(),
                s = e.$element.prop("selectedIndex");
                if (e.multiple && n.stopPropagation(), n.preventDefault(), !e.isDisabled() && !i.parent().hasClass("disabled")) {
                    var a = e.$element.find("option"),
                    l = a.eq(r),
                    u = l.prop("selected"),
                    c = l.parent("optgroup"),
                    d = e.options.maxOptions,
                    h = c.data("maxOptions") || !1;
                    if (e.multiple) {
                        if (l.prop("selected", !u), e.setSelected(r, !u), i.blur(), d !== !1 || h !== !1) {
                            var p = d < a.filter(":selected").length,
                            f = h < c.find("option:selected").length;
                            if (d && p || h && f) if (d && 1 == d) a.prop("selected", !1),
                            l.prop("selected", !0),
                            e.$menu.find(".selected").removeClass("selected"),
                            e.setSelected(r, !0);
                            else if (h && 1 == h) {
                                c.find("option:selected").prop("selected", !1),
                                l.prop("selected", !0);
                                var m = i.data("optgroup");
                                e.$menu.find(".selected").has('a[data-optgroup="' + m + '"]').removeClass("selected"),
                                e.setSelected(r, !0)
                            } else {
                                var g = "function" == typeof e.options.maxOptionsText ? e.options.maxOptionsText(d, h) : e.options.maxOptionsText,
                                v = g[0].replace("{n}", d),
                                y = g[1].replace("{n}", h),
                                b = t('<div class="notify"></div>');
                                g[2] && (v = v.replace("{var}", g[2][d > 1 ? 0 : 1]), y = y.replace("{var}", g[2][h > 1 ? 0 : 1])),
                                l.prop("selected", !1),
                                e.$menu.append(b),
                                d && p && (b.append(t("<div>" + v + "</div>")), e.$element.trigger("maxReached.bs.select")),
                                h && f && (b.append(t("<div>" + y + "</div>")), e.$element.trigger("maxReachedGrp.bs.select")),
                                setTimeout(function() {
                                    e.setSelected(r, !1)
                                },
                                10),
                                b.delay(750).fadeOut(300,
                                function() {
                                    t(this).remove()
                                })
                            }
                        }
                    } else a.prop("selected", !1),
                    l.prop("selected", !0),
                    e.$menu.find(".selected").removeClass("selected"),
                    e.setSelected(r, !0);
                    e.multiple ? e.options.liveSearch && e.$searchbox.focus() : e.$button.focus(),
                    (o != e.$element.val() && e.multiple || s != e.$element.prop("selectedIndex") && !e.multiple) && e.$element.change()
                }
            }),
            this.$menu.on("click", "li.disabled a, .popover-title, .popover-title :not(.close)",
            function(t) {
                t.target == this && (t.preventDefault(), t.stopPropagation(), e.options.liveSearch ? e.$searchbox.focus() : e.$button.focus())
            }),
            this.$menu.on("click", "li.divider, li.dropdown-header",
            function(t) {
                t.preventDefault(),
                t.stopPropagation(),
                e.options.liveSearch ? e.$searchbox.focus() : e.$button.focus()
            }),
            this.$menu.on("click", ".popover-title .close",
            function() {
                e.$button.focus()
            }),
            this.$searchbox.on("click",
            function(t) {
                t.stopPropagation()
            }),
            this.$menu.on("click", ".actions-btn",
            function(n) {
                e.options.liveSearch ? e.$searchbox.focus() : e.$button.focus(),
                n.preventDefault(),
                n.stopPropagation(),
                t(this).is(".bs-select-all") ? e.selectAll() : e.deselectAll(),
                e.$element.change()
            }),
            this.$element.change(function() {
                e.render(!1)
            })
        },
        liveSearchListener: function() {
            var e = this,
            r = t('<li class="no-results"></li>');
            this.$newElement.on("click.dropdown.data-api",
            function() {
                e.$menu.find(".active").removeClass("active"),
                e.$searchbox.val() && (e.$searchbox.val(""), e.$lis.not(".is-hidden").removeClass("hide"), r.parent().length && r.remove()),
                e.multiple || e.$menu.find(".selected").addClass("active"),
                setTimeout(function() {
                    e.$searchbox.focus()
                },
                10)
            }),
            this.$searchbox.on("input propertychange",
            function() {
                e.$searchbox.val() ? (e.options.searchAccentInsensitive ? e.$lis.not(".is-hidden").removeClass("hide").find("a").not(":aicontains(" + n(e.$searchbox.val()) + ")").parent().addClass("hide") : e.$lis.not(".is-hidden").removeClass("hide").find("a").not(":icontains(" + e.$searchbox.val() + ")").parent().addClass("hide"), e.$menu.find("li").filter(":visible:not(.no-results)").length ? r.parent().length && r.remove() : (r.parent().length && r.remove(), r.html(e.options.noneResultsText + ' "' + i(e.$searchbox.val()) + '"').show(), e.$menu.find("li").last().after(r))) : (e.$lis.not(".is-hidden").removeClass("hide"), r.parent().length && r.remove()),
                e.$menu.find("li.active").removeClass("active"),
                e.$menu.find("li").filter(":visible:not(.divider)").eq(0).addClass("active").find("a").focus(),
                t(this).focus()
            })
        },
        val: function(t) {
            return "undefined" != typeof t ? (this.$element.val(t), this.render(), this.$element) : this.$element.val()
        },
        selectAll: function() {
            this.findLis(),
            this.$lis.not(".divider").not(".disabled").not(".selected").filter(":visible").find("a").click()
        },
        deselectAll: function() {
            this.findLis(),
            this.$lis.not(".divider").not(".disabled").filter(".selected").filter(":visible").find("a").click()
        },
        keydown: function(e) {
            var i, r, o, s, a, l, u, c, d, h = t(this),
            p = h.is("input") ? h.parent().parent() : h.parent(),
            f = p.data("this"),
            m = {
                32 : " ",
                48 : "0",
                49 : "1",
                50 : "2",
                51 : "3",
                52 : "4",
                53 : "5",
                54 : "6",
                55 : "7",
                56 : "8",
                57 : "9",
                59 : ";",
                65 : "a",
                66 : "b",
                67 : "c",
                68 : "d",
                69 : "e",
                70 : "f",
                71 : "g",
                72 : "h",
                73 : "i",
                74 : "j",
                75 : "k",
                76 : "l",
                77 : "m",
                78 : "n",
                79 : "o",
                80 : "p",
                81 : "q",
                82 : "r",
                83 : "s",
                84 : "t",
                85 : "u",
                86 : "v",
                87 : "w",
                88 : "x",
                89 : "y",
                90 : "z",
                96 : "0",
                97 : "1",
                98 : "2",
                99 : "3",
                100 : "4",
                101 : "5",
                102 : "6",
                103 : "7",
                104 : "8",
                105 : "9"
            };
            if (f.options.liveSearch && (p = h.parent().parent()), f.options.container && (p = f.$menu), i = t("[role=menu] li a", p), d = f.$menu.parent().hasClass("open"), !d && /([0-9]|[A-z])/.test(String.fromCharCode(e.keyCode)) && (f.options.container ? f.$newElement.trigger("click") : (f.setSize(), f.$menu.parent().addClass("open"), d = !0), f.$searchbox.focus()), f.options.liveSearch && (/(^9$|27)/.test(e.keyCode.toString(10)) && d && 0 === f.$menu.find(".active").length && (e.preventDefault(), f.$menu.parent().removeClass("open"), f.$button.focus()), i = t("[role=menu] li:not(.divider):not(.dropdown-header):visible", p), h.val() || /(38|40)/.test(e.keyCode.toString(10)) || 0 === i.filter(".active").length && (i = f.$newElement.find("li").filter(f.options.searchAccentInsensitive ? ":aicontains(" + n(m[e.keyCode]) + ")": ":icontains(" + m[e.keyCode] + ")"))), i.length) {
                if (/(38|40)/.test(e.keyCode.toString(10))) r = i.index(i.filter(":focus")),
                s = i.parent(":not(.disabled):visible").first().index(),
                a = i.parent(":not(.disabled):visible").last().index(),
                o = i.eq(r).parent().nextAll(":not(.disabled):visible").eq(0).index(),
                l = i.eq(r).parent().prevAll(":not(.disabled):visible").eq(0).index(),
                u = i.eq(o).parent().prevAll(":not(.disabled):visible").eq(0).index(),
                f.options.liveSearch && (i.each(function(e) {
                    t(this).is(":not(.disabled)") && t(this).data("index", e)
                }), r = i.index(i.filter(".active")), s = i.filter(":not(.disabled):visible").first().data("index"), a = i.filter(":not(.disabled):visible").last().data("index"), o = i.eq(r).nextAll(":not(.disabled):visible").eq(0).data("index"), l = i.eq(r).prevAll(":not(.disabled):visible").eq(0).data("index"), u = i.eq(o).prevAll(":not(.disabled):visible").eq(0).data("index")),
                c = h.data("prevIndex"),
                38 == e.keyCode && (f.options.liveSearch && (r -= 1), r != u && r > l && (r = l), s > r && (r = s), r == c && (r = a)),
                40 == e.keyCode && (f.options.liveSearch && (r += 1), -1 == r && (r = 0), r != u && o > r && (r = o), r > a && (r = a), r == c && (r = s)),
                h.data("prevIndex", r),
                f.options.liveSearch ? (e.preventDefault(), h.is(".dropdown-toggle") || (i.removeClass("active"), i.eq(r).addClass("active").find("a").focus(), h.focus())) : i.eq(r).focus();
                else if (!h.is("input")) {
                    var g, v, y = [];
                    i.each(function() {
                        t(this).parent().is(":not(.disabled)") && t.trim(t(this).text().toLowerCase()).substring(0, 1) == m[e.keyCode] && y.push(t(this).parent().index())
                    }),
                    g = t(document).data("keycount"),
                    g++,
                    t(document).data("keycount", g),
                    v = t.trim(t(":focus").text().toLowerCase()).substring(0, 1),
                    v != m[e.keyCode] ? (g = 1, t(document).data("keycount", g)) : g >= y.length && (t(document).data("keycount", 0), g > y.length && (g = 1)),
                    i.eq(y[g - 1]).focus()
                } (/(13|32)/.test(e.keyCode.toString(10)) || /(^9$)/.test(e.keyCode.toString(10)) && f.options.selectOnTab) && d && (/(32)/.test(e.keyCode.toString(10)) || e.preventDefault(), f.options.liveSearch ? /(32)/.test(e.keyCode.toString(10)) || (f.$menu.find(".active a").click(), h.focus()) : t(":focus").click(), t(document).data("keycount", 0)),
                (/(^9$|27)/.test(e.keyCode.toString(10)) && d && (f.multiple || f.options.liveSearch) || /(27)/.test(e.keyCode.toString(10)) && !d) && (f.$menu.parent().removeClass("open"), f.$button.focus())
            }
        },
        mobile: function() {
            this.$element.addClass("mobile-device").appendTo(this.$newElement),
            this.options.container && this.$menu.hide()
        },
        refresh: function() {
            this.$lis = null,
            this.reloadLi(),
            this.render(),
            this.setWidth(),
            this.setStyle(),
            this.checkDisabled(),
            this.liHeight()
        },
        update: function() {
            this.reloadLi(),
            this.setWidth(),
            this.setStyle(),
            this.checkDisabled(),
            this.liHeight()
        },
        hide: function() {
            this.$newElement.hide()
        },
        show: function() {
            this.$newElement.show()
        },
        remove: function() {
            this.$newElement.remove(),
            this.$element.remove()
        }
    };
    var s = t.fn.selectpicker;
    t.fn.selectpicker = r,
    t.fn.selectpicker.Constructor = o,
    t.fn.selectpicker.noConflict = function() {
        return t.fn.selectpicker = s,
        this
    },
    t(document).data("keycount", 0).on("keydown", ".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bs-searchbox input", o.prototype.keydown).on("focusin.modal", ".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bs-searchbox input",
    function(t) {
        t.stopPropagation()
    }),
    t(window).on("load.bs.select.data-api",
    function() {
        t(".selectpicker").each(function() {
            var e = t(this);
            r.call(e, e.data())
        })
    })
} (jQuery),
function() {
    var t = this,
    e = t._,
    n = Array.prototype,
    i = Object.prototype,
    r = Function.prototype,
    o = n.push,
    s = n.slice,
    a = n.concat,
    l = i.toString,
    u = i.hasOwnProperty,
    c = Array.isArray,
    d = Object.keys,
    h = r.bind,
    p = function(t) {
        return t instanceof p ? t: this instanceof p ? void(this._wrapped = t) : new p(t)
    };
    "undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = p), exports._ = p) : t._ = p,
    p.VERSION = "1.7.0";
    var f = function(t, e, n) {
        if (void 0 === e) return t;
        switch (null == n ? 3 : n) {
        case 1:
            return function(n) {
                return t.call(e, n)
            };
        case 2:
            return function(n, i) {
                return t.call(e, n, i)
            };
        case 3:
            return function(n, i, r) {
                return t.call(e, n, i, r)
            };
        case 4:
            return function(n, i, r, o) {
                return t.call(e, n, i, r, o)
            }
        }
        return function() {
            return t.apply(e, arguments)
        }
    };
    p.iteratee = function(t, e, n) {
        return null == t ? p.identity: p.isFunction(t) ? f(t, e, n) : p.isObject(t) ? p.matches(t) : p.property(t)
    },
    p.each = p.forEach = function(t, e, n) {
        if (null == t) return t;
        e = f(e, n);
        var i, r = t.length;
        if (r === +r) for (i = 0; r > i; i++) e(t[i], i, t);
        else {
            var o = p.keys(t);
            for (i = 0, r = o.length; r > i; i++) e(t[o[i]], o[i], t)
        }
        return t
    },
    p.map = p.collect = function(t, e, n) {
        if (null == t) return [];
        e = p.iteratee(e, n);
        for (var i, r = t.length !== +t.length && p.keys(t), o = (r || t).length, s = Array(o), a = 0; o > a; a++) i = r ? r[a] : a,
        s[a] = e(t[i], i, t);
        return s
    };
    var m = "Reduce of empty array with no initial value";
    p.reduce = p.foldl = p.inject = function(t, e, n, i) {
        null == t && (t = []),
        e = f(e, i, 4);
        var r, o = t.length !== +t.length && p.keys(t),
        s = (o || t).length,
        a = 0;
        if (arguments.length < 3) {
            if (!s) throw new TypeError(m);
            n = t[o ? o[a++] : a++]
        }
        for (; s > a; a++) r = o ? o[a] : a,
        n = e(n, t[r], r, t);
        return n
    },
    p.reduceRight = p.foldr = function(t, e, n, i) {
        null == t && (t = []),
        e = f(e, i, 4);
        var r, o = t.length !== +t.length && p.keys(t),
        s = (o || t).length;
        if (arguments.length < 3) {
            if (!s) throw new TypeError(m);
            n = t[o ? o[--s] : --s]
        }
        for (; s--;) r = o ? o[s] : s,
        n = e(n, t[r], r, t);
        return n
    },
    p.find = p.detect = function(t, e, n) {
        var i;
        return e = p.iteratee(e, n),
        p.some(t,
        function(t, n, r) {
            return e(t, n, r) ? (i = t, !0) : void 0
        }),
        i
    },
    p.filter = p.select = function(t, e, n) {
        var i = [];
        return null == t ? i: (e = p.iteratee(e, n), p.each(t,
        function(t, n, r) {
            e(t, n, r) && i.push(t)
        }), i)
    },
    p.reject = function(t, e, n) {
        return p.filter(t, p.negate(p.iteratee(e)), n)
    },
    p.every = p.all = function(t, e, n) {
        if (null == t) return ! 0;
        e = p.iteratee(e, n);
        var i, r, o = t.length !== +t.length && p.keys(t),
        s = (o || t).length;
        for (i = 0; s > i; i++) if (r = o ? o[i] : i, !e(t[r], r, t)) return ! 1;
        return ! 0
    },
    p.some = p.any = function(t, e, n) {
        if (null == t) return ! 1;
        e = p.iteratee(e, n);
        var i, r, o = t.length !== +t.length && p.keys(t),
        s = (o || t).length;
        for (i = 0; s > i; i++) if (r = o ? o[i] : i, e(t[r], r, t)) return ! 0;
        return ! 1
    },
    p.contains = p.include = function(t, e) {
        return null == t ? !1 : (t.length !== +t.length && (t = p.values(t)), p.indexOf(t, e) >= 0)
    },
    p.invoke = function(t, e) {
        var n = s.call(arguments, 2),
        i = p.isFunction(e);
        return p.map(t,
        function(t) {
            return (i ? e: t[e]).apply(t, n)
        })
    },
    p.pluck = function(t, e) {
        return p.map(t, p.property(e))
    },
    p.where = function(t, e) {
        return p.filter(t, p.matches(e))
    },
    p.findWhere = function(t, e) {
        return p.find(t, p.matches(e))
    },
    p.max = function(t, e, n) {
        var i, r, o = -1 / 0,
        s = -1 / 0;
        if (null == e && null != t) {
            t = t.length === +t.length ? t: p.values(t);
            for (var a = 0,
            l = t.length; l > a; a++) i = t[a],
            i > o && (o = i)
        } else e = p.iteratee(e, n),
        p.each(t,
        function(t, n, i) {
            r = e(t, n, i),
            (r > s || r === -1 / 0 && o === -1 / 0) && (o = t, s = r)
        });
        return o
    },
    p.min = function(t, e, n) {
        var i, r, o = 1 / 0,
        s = 1 / 0;
        if (null == e && null != t) {
            t = t.length === +t.length ? t: p.values(t);
            for (var a = 0,
            l = t.length; l > a; a++) i = t[a],
            o > i && (o = i)
        } else e = p.iteratee(e, n),
        p.each(t,
        function(t, n, i) {
            r = e(t, n, i),
            (s > r || 1 / 0 === r && 1 / 0 === o) && (o = t, s = r)
        });
        return o
    },
    p.shuffle = function(t) {
        for (var e, n = t && t.length === +t.length ? t: p.values(t), i = n.length, r = Array(i), o = 0; i > o; o++) e = p.random(0, o),
        e !== o && (r[o] = r[e]),
        r[e] = n[o];
        return r
    },
    p.sample = function(t, e, n) {
        return null == e || n ? (t.length !== +t.length && (t = p.values(t)), t[p.random(t.length - 1)]) : p.shuffle(t).slice(0, Math.max(0, e))
    },
    p.sortBy = function(t, e, n) {
        return e = p.iteratee(e, n),
        p.pluck(p.map(t,
        function(t, n, i) {
            return {
                value: t,
                index: n,
                criteria: e(t, n, i)
            }
        }).sort(function(t, e) {
            var n = t.criteria,
            i = e.criteria;
            if (n !== i) {
                if (n > i || void 0 === n) return 1;
                if (i > n || void 0 === i) return - 1
            }
            return t.index - e.index
        }), "value")
    };
    var g = function(t) {
        return function(e, n, i) {
            var r = {};
            return n = p.iteratee(n, i),
            p.each(e,
            function(i, o) {
                var s = n(i, o, e);
                t(r, i, s)
            }),
            r
        }
    };
    p.groupBy = g(function(t, e, n) {
        p.has(t, n) ? t[n].push(e) : t[n] = [e]
    }),
    p.indexBy = g(function(t, e, n) {
        t[n] = e
    }),
    p.countBy = g(function(t, e, n) {
        p.has(t, n) ? t[n]++:t[n] = 1
    }),
    p.sortedIndex = function(t, e, n, i) {
        n = p.iteratee(n, i, 1);
        for (var r = n(e), o = 0, s = t.length; s > o;) {
            var a = o + s >>> 1;
            n(t[a]) < r ? o = a + 1 : s = a
        }
        return o
    },
    p.toArray = function(t) {
        return t ? p.isArray(t) ? s.call(t) : t.length === +t.length ? p.map(t, p.identity) : p.values(t) : []
    },
    p.size = function(t) {
        return null == t ? 0 : t.length === +t.length ? t.length: p.keys(t).length
    },
    p.partition = function(t, e, n) {
        e = p.iteratee(e, n);
        var i = [],
        r = [];
        return p.each(t,
        function(t, n, o) { (e(t, n, o) ? i: r).push(t)
        }),
        [i, r]
    },
    p.first = p.head = p.take = function(t, e, n) {
        return null == t ? void 0 : null == e || n ? t[0] : 0 > e ? [] : s.call(t, 0, e)
    },
    p.initial = function(t, e, n) {
        return s.call(t, 0, Math.max(0, t.length - (null == e || n ? 1 : e)))
    },
    p.last = function(t, e, n) {
        return null == t ? void 0 : null == e || n ? t[t.length - 1] : s.call(t, Math.max(t.length - e, 0))
    },
    p.rest = p.tail = p.drop = function(t, e, n) {
        return s.call(t, null == e || n ? 1 : e)
    },
    p.compact = function(t) {
        return p.filter(t, p.identity)
    };
    var v = function(t, e, n, i) {
        if (e && p.every(t, p.isArray)) return a.apply(i, t);
        for (var r = 0,
        s = t.length; s > r; r++) {
            var l = t[r];
            p.isArray(l) || p.isArguments(l) ? e ? o.apply(i, l) : v(l, e, n, i) : n || i.push(l)
        }
        return i
    };
    p.flatten = function(t, e) {
        return v(t, e, !1, [])
    },
    p.without = function(t) {
        return p.difference(t, s.call(arguments, 1))
    },
    p.uniq = p.unique = function(t, e, n, i) {
        if (null == t) return [];
        p.isBoolean(e) || (i = n, n = e, e = !1),
        null != n && (n = p.iteratee(n, i));
        for (var r = [], o = [], s = 0, a = t.length; a > s; s++) {
            var l = t[s];
            if (e) s && o === l || r.push(l),
            o = l;
            else if (n) {
                var u = n(l, s, t);
                p.indexOf(o, u) < 0 && (o.push(u), r.push(l))
            } else p.indexOf(r, l) < 0 && r.push(l)
        }
        return r
    },
    p.union = function() {
        return p.uniq(v(arguments, !0, !0, []))
    },
    p.intersection = function(t) {
        if (null == t) return [];
        for (var e = [], n = arguments.length, i = 0, r = t.length; r > i; i++) {
            var o = t[i];
            if (!p.contains(e, o)) {
                for (var s = 1; n > s && p.contains(arguments[s], o); s++);
                s === n && e.push(o)
            }
        }
        return e
    },
    p.difference = function(t) {
        var e = v(s.call(arguments, 1), !0, !0, []);
        return p.filter(t,
        function(t) {
            return ! p.contains(e, t)
        })
    },
    p.zip = function(t) {
        if (null == t) return [];
        for (var e = p.max(arguments, "length").length, n = Array(e), i = 0; e > i; i++) n[i] = p.pluck(arguments, i);
        return n
    },
    p.object = function(t, e) {
        if (null == t) return {};
        for (var n = {},
        i = 0,
        r = t.length; r > i; i++) e ? n[t[i]] = e[i] : n[t[i][0]] = t[i][1];
        return n
    },
    p.indexOf = function(t, e, n) {
        if (null == t) return - 1;
        var i = 0,
        r = t.length;
        if (n) {
            if ("number" != typeof n) return i = p.sortedIndex(t, e),
            t[i] === e ? i: -1;
            i = 0 > n ? Math.max(0, r + n) : n
        }
        for (; r > i; i++) if (t[i] === e) return i;
        return - 1
    },
    p.lastIndexOf = function(t, e, n) {
        if (null == t) return - 1;
        var i = t.length;
        for ("number" == typeof n && (i = 0 > n ? i + n + 1 : Math.min(i, n + 1)); --i >= 0;) if (t[i] === e) return i;
        return - 1
    },
    p.range = function(t, e, n) {
        arguments.length <= 1 && (e = t || 0, t = 0),
        n = n || 1;
        for (var i = Math.max(Math.ceil((e - t) / n), 0), r = Array(i), o = 0; i > o; o++, t += n) r[o] = t;
        return r
    };
    var y = function() {};
    p.bind = function(t, e) {
        var n, i;
        if (h && t.bind === h) return h.apply(t, s.call(arguments, 1));
        if (!p.isFunction(t)) throw new TypeError("Bind must be called on a function");
        return n = s.call(arguments, 2),
        i = function() {
            if (! (this instanceof i)) return t.apply(e, n.concat(s.call(arguments)));
            y.prototype = t.prototype;
            var r = new y;
            y.prototype = null;
            var o = t.apply(r, n.concat(s.call(arguments)));
            return p.isObject(o) ? o: r
        }
    },
    p.partial = function(t) {
        var e = s.call(arguments, 1);
        return function() {
            for (var n = 0,
            i = e.slice(), r = 0, o = i.length; o > r; r++) i[r] === p && (i[r] = arguments[n++]);
            for (; n < arguments.length;) i.push(arguments[n++]);
            return t.apply(this, i)
        }
    },
    p.bindAll = function(t) {
        var e, n, i = arguments.length;
        if (1 >= i) throw new Error("bindAll must be passed function names");
        for (e = 1; i > e; e++) n = arguments[e],
        t[n] = p.bind(t[n], t);
        return t
    },
    p.memoize = function(t, e) {
        var n = function(i) {
            var r = n.cache,
            o = e ? e.apply(this, arguments) : i;
            return p.has(r, o) || (r[o] = t.apply(this, arguments)),
            r[o]
        };
        return n.cache = {},
        n
    },
    p.delay = function(t, e) {
        var n = s.call(arguments, 2);
        return setTimeout(function() {
            return t.apply(null, n)
        },
        e)
    },
    p.defer = function(t) {
        return p.delay.apply(p, [t, 1].concat(s.call(arguments, 1)))
    },
    p.throttle = function(t, e, n) {
        var i, r, o, s = null,
        a = 0;
        n || (n = {});
        var l = function() {
            a = n.leading === !1 ? 0 : p.now(),
            s = null,
            o = t.apply(i, r),
            s || (i = r = null)
        };
        return function() {
            var u = p.now();
            a || n.leading !== !1 || (a = u);
            var c = e - (u - a);
            return i = this,
            r = arguments,
            0 >= c || c > e ? (clearTimeout(s), s = null, a = u, o = t.apply(i, r), s || (i = r = null)) : s || n.trailing === !1 || (s = setTimeout(l, c)),
            o
        }
    },
    p.debounce = function(t, e, n) {
        var i, r, o, s, a, l = function() {
            var u = p.now() - s;
            e > u && u > 0 ? i = setTimeout(l, e - u) : (i = null, n || (a = t.apply(o, r), i || (o = r = null)))
        };
        return function() {
            o = this,
            r = arguments,
            s = p.now();
            var u = n && !i;
            return i || (i = setTimeout(l, e)),
            u && (a = t.apply(o, r), o = r = null),
            a
        }
    },
    p.wrap = function(t, e) {
        return p.partial(e, t)
    },
    p.negate = function(t) {
        return function() {
            return ! t.apply(this, arguments)
        }
    },
    p.compose = function() {
        var t = arguments,
        e = t.length - 1;
        return function() {
            for (var n = e,
            i = t[e].apply(this, arguments); n--;) i = t[n].call(this, i);
            return i
        }
    },
    p.after = function(t, e) {
        return function() {
            return--t < 1 ? e.apply(this, arguments) : void 0
        }
    },
    p.before = function(t, e) {
        var n;
        return function() {
            return--t > 0 ? n = e.apply(this, arguments) : e = null,
            n
        }
    },
    p.once = p.partial(p.before, 2),
    p.keys = function(t) {
        if (!p.isObject(t)) return [];
        if (d) return d(t);
        var e = [];
        for (var n in t) p.has(t, n) && e.push(n);
        return e
    },
    p.values = function(t) {
        for (var e = p.keys(t), n = e.length, i = Array(n), r = 0; n > r; r++) i[r] = t[e[r]];
        return i
    },
    p.pairs = function(t) {
        for (var e = p.keys(t), n = e.length, i = Array(n), r = 0; n > r; r++) i[r] = [e[r], t[e[r]]];
        return i
    },
    p.invert = function(t) {
        for (var e = {},
        n = p.keys(t), i = 0, r = n.length; r > i; i++) e[t[n[i]]] = n[i];
        return e
    },
    p.functions = p.methods = function(t) {
        var e = [];
        for (var n in t) p.isFunction(t[n]) && e.push(n);
        return e.sort()
    },
    p.extend = function(t) {
        if (!p.isObject(t)) return t;
        for (var e, n, i = 1,
        r = arguments.length; r > i; i++) {
            e = arguments[i];
            for (n in e) u.call(e, n) && (t[n] = e[n])
        }
        return t
    },
    p.pick = function(t, e, n) {
        var i, r = {};
        if (null == t) return r;
        if (p.isFunction(e)) {
            e = f(e, n);
            for (i in t) {
                var o = t[i];
                e(o, i, t) && (r[i] = o)
            }
        } else {
            var l = a.apply([], s.call(arguments, 1));
            t = new Object(t);
            for (var u = 0,
            c = l.length; c > u; u++) i = l[u],
            i in t && (r[i] = t[i])
        }
        return r
    },
    p.omit = function(t, e, n) {
        if (p.isFunction(e)) e = p.negate(e);
        else {
            var i = p.map(a.apply([], s.call(arguments, 1)), String);
            e = function(t, e) {
                return ! p.contains(i, e)
            }
        }
        return p.pick(t, e, n)
    },
    p.defaults = function(t) {
        if (!p.isObject(t)) return t;
        for (var e = 1,
        n = arguments.length; n > e; e++) {
            var i = arguments[e];
            for (var r in i) void 0 === t[r] && (t[r] = i[r])
        }
        return t
    },
    p.clone = function(t) {
        return p.isObject(t) ? p.isArray(t) ? t.slice() : p.extend({},
        t) : t
    },
    p.tap = function(t, e) {
        return e(t),
        t
    };
    var b = function(t, e, n, i) {
        if (t === e) return 0 !== t || 1 / t === 1 / e;
        if (null == t || null == e) return t === e;
        t instanceof p && (t = t._wrapped),
        e instanceof p && (e = e._wrapped);
        var r = l.call(t);
        if (r !== l.call(e)) return ! 1;
        switch (r) {
        case "[object RegExp]":
        case "[object String]":
            return "" + t == "" + e;
        case "[object Number]":
            return + t !== +t ? +e !== +e: 0 === +t ? 1 / +t === 1 / e: +t === +e;
        case "[object Date]":
        case "[object Boolean]":
            return + t === +e
        }
        if ("object" != typeof t || "object" != typeof e) return ! 1;
        for (var o = n.length; o--;) if (n[o] === t) return i[o] === e;
        var s = t.constructor,
        a = e.constructor;
        if (s !== a && "constructor" in t && "constructor" in e && !(p.isFunction(s) && s instanceof s && p.isFunction(a) && a instanceof a)) return ! 1;
        n.push(t),
        i.push(e);
        var u, c;
        if ("[object Array]" === r) {
            if (u = t.length, c = u === e.length) for (; u--&&(c = b(t[u], e[u], n, i)););
        } else {
            var d, h = p.keys(t);
            if (u = h.length, c = p.keys(e).length === u) for (; u--&&(d = h[u], c = p.has(e, d) && b(t[d], e[d], n, i)););
        }
        return n.pop(),
        i.pop(),
        c
    };
    p.isEqual = function(t, e) {
        return b(t, e, [], [])
    },
    p.isEmpty = function(t) {
        if (null == t) return ! 0;
        if (p.isArray(t) || p.isString(t) || p.isArguments(t)) return 0 === t.length;
        for (var e in t) if (p.has(t, e)) return ! 1;
        return ! 0
    },
    p.isElement = function(t) {
        return ! (!t || 1 !== t.nodeType)
    },
    p.isArray = c ||
    function(t) {
        return "[object Array]" === l.call(t)
    },
    p.isObject = function(t) {
        var e = typeof t;
        return "function" === e || "object" === e && !!t
    },
    p.each(["Arguments", "Function", "String", "Number", "Date", "RegExp"],
    function(t) {
        p["is" + t] = function(e) {
            return l.call(e) === "[object " + t + "]"
        }
    }),
    p.isArguments(arguments) || (p.isArguments = function(t) {
        return p.has(t, "callee")
    }),
    "function" != typeof / . / &&(p.isFunction = function(t) {
        return "function" == typeof t || !1
    }),
    p.isFinite = function(t) {
        return isFinite(t) && !isNaN(parseFloat(t))
    },
    p.isNaN = function(t) {
        return p.isNumber(t) && t !== +t
    },
    p.isBoolean = function(t) {
        return t === !0 || t === !1 || "[object Boolean]" === l.call(t)
    },
    p.isNull = function(t) {
        return null === t
    },
    p.isUndefined = function(t) {
        return void 0 === t
    },
    p.has = function(t, e) {
        return null != t && u.call(t, e)
    },
    p.noConflict = function() {
        return t._ = e,
        this
    },
    p.identity = function(t) {
        return t
    },
    p.constant = function(t) {
        return function() {
            return t
        }
    },
    p.noop = function() {},
    p.property = function(t) {
        return function(e) {
            return e[t]
        }
    },
    p.matches = function(t) {
        var e = p.pairs(t),
        n = e.length;
        return function(t) {
            if (null == t) return ! n;
            t = new Object(t);
            for (var i = 0; n > i; i++) {
                var r = e[i],
                o = r[0];
                if (r[1] !== t[o] || !(o in t)) return ! 1
            }
            return ! 0
        }
    },
    p.times = function(t, e, n) {
        var i = Array(Math.max(0, t));
        e = f(e, n, 1);
        for (var r = 0; t > r; r++) i[r] = e(r);
        return i
    },
    p.random = function(t, e) {
        return null == e && (e = t, t = 0),
        t + Math.floor(Math.random() * (e - t + 1))
    },
    p.now = Date.now ||
    function() {
        return (new Date).getTime()
    };
    var w = {
        "&": "&amp;",
        "<": "&lt;",
        ">": "&gt;",
        '"': "&quot;",
        "'": "&#x27;",
        "`": "&#x60;"
    },
    x = p.invert(w),
    k = function(t) {
        var e = function(e) {
            return t[e]
        },
        n = "(?:" + p.keys(t).join("|") + ")",
        i = RegExp(n),
        r = RegExp(n, "g");
        return function(t) {
            return t = null == t ? "": "" + t,
            i.test(t) ? t.replace(r, e) : t
        }
    };
    p.escape = k(w),
    p.unescape = k(x),
    p.result = function(t, e) {
        if (null == t) return void 0;
        var n = t[e];
        return p.isFunction(n) ? t[e]() : n
    };
    var T = 0;
    p.uniqueId = function(t) {
        var e = ++T + "";
        return t ? t + e: e
    },
    p.templateSettings = {
        evaluate: /<%([\s\S]+?)%>/g,
        interpolate: /<%=([\s\S]+?)%>/g,
        escape: /<%-([\s\S]+?)%>/g
    };
    var E = /(.)^/,
    C = {
        "'": "'",
        "\\": "\\",
        "\r": "r",
        "\n": "n",
        "\u2028": "u2028",
        "\u2029": "u2029"
    },
    $ = /\\|'|\r|\n|\u2028|\u2029/g,
    _ = function(t) {
        return "\\" + C[t]
    };
    p.template = function(t, e, n) { ! e && n && (e = n),
        e = p.defaults({},
        e, p.templateSettings);
        var i = RegExp([(e.escape || E).source, (e.interpolate || E).source, (e.evaluate || E).source].join("|") + "|$", "g"),
        r = 0,
        o = "__p+='";
        t.replace(i,
        function(e, n, i, s, a) {
            return o += t.slice(r, a).replace($, _),
            r = a + e.length,
            n ? o += "'+\n((__t=(" + n + "))==null?'':_.escape(__t))+\n'": i ? o += "'+\n((__t=(" + i + "))==null?'':__t)+\n'": s && (o += "';\n" + s + "\n__p+='"),
            e
        }),
        o += "';\n",
        e.variable || (o = "with(obj||{}){\n" + o + "}\n"),
        o = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + o + "return __p;\n";
        try {
            var s = new Function(e.variable || "obj", "_", o)
        } catch(a) {
            throw a.source = o,
            a
        }
        var l = function(t) {
            return s.call(this, t, p)
        },
        u = e.variable || "obj";
        return l.source = "function(" + u + "){\n" + o + "}",
        l
    },
    p.chain = function(t) {
        var e = p(t);
        return e._chain = !0,
        e
    };
    var S = function(t) {
        return this._chain ? p(t).chain() : t
    };
    p.mixin = function(t) {
        p.each(p.functions(t),
        function(e) {
            var n = p[e] = t[e];
            p.prototype[e] = function() {
                var t = [this._wrapped];
                return o.apply(t, arguments),
                S.call(this, n.apply(p, t))
            }
        })
    },
    p.mixin(p),
    p.each(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"],
    function(t) {
        var e = n[t];
        p.prototype[t] = function() {
            var n = this._wrapped;
            return e.apply(n, arguments),
            "shift" !== t && "splice" !== t || 0 !== n.length || delete n[0],
            S.call(this, n)
        }
    }),
    p.each(["concat", "join", "slice"],
    function(t) {
        var e = n[t];
        p.prototype[t] = function() {
            return S.call(this, e.apply(this._wrapped, arguments))
        }
    }),
    p.prototype.value = function() {
        return this._wrapped
    },
    "function" == typeof define && define.amd && define("underscore", [],
    function() {
        return p
    })
}.call(this),
function(t, e) {
    if ("function" == typeof define && define.amd) define(["underscore", "jquery", "exports"],
    function(n, i, r) {
        t.Backbone = e(t, r, n, i)
    });
    else if ("undefined" != typeof exports) {
        var n = require("underscore");
        e(t, exports, n)
    } else t.Backbone = e(t, {},
    t._, t.jQuery || t.Zepto || t.ender || t.$)
} (this,
function(t, e, n, i) {
    var r = t.Backbone,
    o = [],
    s = (o.push, o.slice);
    o.splice;
    e.VERSION = "1.1.2",
    e.$ = i,
    e.noConflict = function() {
        return t.Backbone = r,
        this
    },
    e.emulateHTTP = !1,
    e.emulateJSON = !1;
    var a = e.Events = {
        on: function(t, e, n) {
            if (!u(this, "on", t, [e, n]) || !e) return this;
            this._events || (this._events = {});
            var i = this._events[t] || (this._events[t] = []);
            return i.push({
                callback: e,
                context: n,
                ctx: n || this
            }),
            this
        },
        once: function(t, e, i) {
            if (!u(this, "once", t, [e, i]) || !e) return this;
            var r = this,
            o = n.once(function() {
                r.off(t, o),
                e.apply(this, arguments)
            });
            return o._callback = e,
            this.on(t, o, i)
        },
        off: function(t, e, i) {
            var r, o, s, a, l, c, d, h;
            if (!this._events || !u(this, "off", t, [e, i])) return this;
            if (!t && !e && !i) return this._events = void 0,
            this;
            for (a = t ? [t] : n.keys(this._events), l = 0, c = a.length; c > l; l++) if (t = a[l], s = this._events[t]) {
                if (this._events[t] = r = [], e || i) for (d = 0, h = s.length; h > d; d++) o = s[d],
                (e && e !== o.callback && e !== o.callback._callback || i && i !== o.context) && r.push(o);
                r.length || delete this._events[t]
            }
            return this
        },
        trigger: function(t) {
            if (!this._events) return this;
            var e = s.call(arguments, 1);
            if (!u(this, "trigger", t, e)) return this;
            var n = this._events[t],
            i = this._events.all;
            return n && c(n, e),
            i && c(i, arguments),
            this
        },
        stopListening: function(t, e, i) {
            var r = this._listeningTo;
            if (!r) return this;
            var o = !e && !i;
            i || "object" != typeof e || (i = this),
            t && ((r = {})[t._listenId] = t);
            for (var s in r) t = r[s],
            t.off(e, i, this),
            (o || n.isEmpty(t._events)) && delete this._listeningTo[s];
            return this
        }
    },
    l = /\s+/,
    u = function(t, e, n, i) {
        if (!n) return ! 0;
        if ("object" == typeof n) {
            for (var r in n) t[e].apply(t, [r, n[r]].concat(i));
            return ! 1
        }
        if (l.test(n)) {
            for (var o = n.split(l), s = 0, a = o.length; a > s; s++) t[e].apply(t, [o[s]].concat(i));
            return ! 1
        }
        return ! 0
    },
    c = function(t, e) {
        var n, i = -1,
        r = t.length,
        o = e[0],
        s = e[1],
        a = e[2];
        switch (e.length) {
        case 0:
            for (; ++i < r;)(n = t[i]).callback.call(n.ctx);
            return;
        case 1:
            for (; ++i < r;)(n = t[i]).callback.call(n.ctx, o);
            return;
        case 2:
            for (; ++i < r;)(n = t[i]).callback.call(n.ctx, o, s);
            return;
        case 3:
            for (; ++i < r;)(n = t[i]).callback.call(n.ctx, o, s, a);
            return;
        default:
            for (; ++i < r;)(n = t[i]).callback.apply(n.ctx, e);
            return
        }
    },
    d = {
        listenTo: "on",
        listenToOnce: "once"
    };
    n.each(d,
    function(t, e) {
        a[e] = function(e, i, r) {
            var o = this._listeningTo || (this._listeningTo = {}),
            s = e._listenId || (e._listenId = n.uniqueId("l"));
            return o[s] = e,
            r || "object" != typeof i || (r = this),
            e[t](i, r, this),
            this
        }
    }),
    a.bind = a.on,
    a.unbind = a.off,
    n.extend(e, a);
    var h = e.Model = function(t, e) {
        var i = t || {};
        e || (e = {}),
        this.cid = n.uniqueId("c"),
        this.attributes = {},
        e.collection && (this.collection = e.collection),
        e.parse && (i = this.parse(i, e) || {}),
        i = n.defaults({},
        i, n.result(this, "defaults")),
        this.set(i, e),
        this.changed = {},
        this.initialize.apply(this, arguments)
    };
    n.extend(h.prototype, a, {
        changed: null,
        validationError: null,
        idAttribute: "id",
        initialize: function() {},
        toJSON: function(t) {
            return n.clone(this.attributes)
        },
        sync: function() {
            return e.sync.apply(this, arguments)
        },
        get: function(t) {
            return this.attributes[t]
        },
        escape: function(t) {
            return n.escape(this.get(t))
        },
        has: function(t) {
            return null != this.get(t)
        },
        set: function(t, e, i) {
            var r, o, s, a, l, u, c, d;
            if (null == t) return this;
            if ("object" == typeof t ? (o = t, i = e) : (o = {})[t] = e, i || (i = {}), !this._validate(o, i)) return ! 1;
            s = i.unset,
            l = i.silent,
            a = [],
            u = this._changing,
            this._changing = !0,
            u || (this._previousAttributes = n.clone(this.attributes), this.changed = {}),
            d = this.attributes,
            c = this._previousAttributes,
            this.idAttribute in o && (this.id = o[this.idAttribute]);
            for (r in o) e = o[r],
            n.isEqual(d[r], e) || a.push(r),
            n.isEqual(c[r], e) ? delete this.changed[r] : this.changed[r] = e,
            s ? delete d[r] : d[r] = e;
            if (!l) {
                a.length && (this._pending = i);
                for (var h = 0,
                p = a.length; p > h; h++) this.trigger("change:" + a[h], this, d[a[h]], i)
            }
            if (u) return this;
            if (!l) for (; this._pending;) i = this._pending,
            this._pending = !1,
            this.trigger("change", this, i);
            return this._pending = !1,
            this._changing = !1,
            this
        },
        unset: function(t, e) {
            return this.set(t, void 0, n.extend({},
            e, {
                unset: !0
            }))
        },
        clear: function(t) {
            var e = {};
            for (var i in this.attributes) e[i] = void 0;
            return this.set(e, n.extend({},
            t, {
                unset: !0
            }))
        },
        hasChanged: function(t) {
            return null == t ? !n.isEmpty(this.changed) : n.has(this.changed, t)
        },
        changedAttributes: function(t) {
            if (!t) return this.hasChanged() ? n.clone(this.changed) : !1;
            var e, i = !1,
            r = this._changing ? this._previousAttributes: this.attributes;
            for (var o in t) n.isEqual(r[o], e = t[o]) || ((i || (i = {}))[o] = e);
            return i
        },
        previous: function(t) {
            return null != t && this._previousAttributes ? this._previousAttributes[t] : null
        },
        previousAttributes: function() {
            return n.clone(this._previousAttributes)
        },
        fetch: function(t) {
            t = t ? n.clone(t) : {},
            void 0 === t.parse && (t.parse = !0);
            var e = this,
            i = t.success;
            return t.success = function(n) {
                return e.set(e.parse(n, t), t) ? (i && i(e, n, t), void e.trigger("sync", e, n, t)) : !1
            },
            R(this, t),
            this.sync("read", this, t)
        },
        save: function(t, e, i) {
            var r, o, s, a = this.attributes;
            if (null == t || "object" == typeof t ? (r = t, i = e) : (r = {})[t] = e, i = n.extend({
                validate: !0
            },
            i), r && !i.wait) {
                if (!this.set(r, i)) return ! 1
            } else if (!this._validate(r, i)) return ! 1;
            r && i.wait && (this.attributes = n.extend({},
            a, r)),
            void 0 === i.parse && (i.parse = !0);
            var l = this,
            u = i.success;
            return i.success = function(t) {
                l.attributes = a;
                var e = l.parse(t, i);
                return i.wait && (e = n.extend(r || {},
                e)),
                n.isObject(e) && !l.set(e, i) ? !1 : (u && u(l, t, i), void l.trigger("sync", l, t, i))
            },
            R(this, i),
            o = this.isNew() ? "create": i.patch ? "patch": "update",
            "patch" === o && (i.attrs = r),
            s = this.sync(o, this, i),
            r && i.wait && (this.attributes = a),
            s
        },
        destroy: function(t) {
            t = t ? n.clone(t) : {};
            var e = this,
            i = t.success,
            r = function() {
                e.trigger("destroy", e, e.collection, t)
            };
            if (t.success = function(n) { (t.wait || e.isNew()) && r(),
                i && i(e, n, t),
                e.isNew() || e.trigger("sync", e, n, t)
            },
            this.isNew()) return t.success(),
            !1;
            R(this, t);
            var o = this.sync("delete", this, t);
            return t.wait || r(),
            o
        },
        url: function() {
            var t = n.result(this, "urlRoot") || n.result(this.collection, "url") || O();
            return this.isNew() ? t: t.replace(/([^\/])$/, "$1/") + encodeURIComponent(this.id)
        },
        parse: function(t, e) {
            return t
        },
        clone: function() {
            return new this.constructor(this.attributes)
        },
        isNew: function() {
            return ! this.has(this.idAttribute)
        },
        isValid: function(t) {
            return this._validate({},
            n.extend(t || {},
            {
                validate: !0
            }))
        },
        _validate: function(t, e) {
            if (!e.validate || !this.validate) return ! 0;
            t = n.extend({},
            this.attributes, t);
            var i = this.validationError = this.validate(t, e) || null;
            return i ? (this.trigger("invalid", this, i, n.extend(e, {
                validationError: i
            })), !1) : !0
        }
    });
    var p = ["keys", "values", "pairs", "invert", "pick", "omit"];
    n.each(p,
    function(t) {
        h.prototype[t] = function() {
            var e = s.call(arguments);
            return e.unshift(this.attributes),
            n[t].apply(n, e)
        }
    });
    var f = e.Collection = function(t, e) {
        e || (e = {}),
        e.model && (this.model = e.model),
        void 0 !== e.comparator && (this.comparator = e.comparator),
        this._reset(),
        this.initialize.apply(this, arguments),
        t && this.reset(t, n.extend({
            silent: !0
        },
        e))
    },
    m = {
        add: !0,
        remove: !0,
        merge: !0
    },
    g = {
        add: !0,
        remove: !1
    };
    n.extend(f.prototype, a, {
        model: h,
        initialize: function() {},
        toJSON: function(t) {
            return this.map(function(e) {
                return e.toJSON(t)
            })
        },
        sync: function() {
            return e.sync.apply(this, arguments)
        },
        add: function(t, e) {
            return this.set(t, n.extend({
                merge: !1
            },
            e, g))
        },
        remove: function(t, e) {
            var i = !n.isArray(t);
            t = i ? [t] : n.clone(t),
            e || (e = {});
            var r, o, s, a;
            for (r = 0, o = t.length; o > r; r++) a = t[r] = this.get(t[r]),
            a && (delete this._byId[a.id], delete this._byId[a.cid], s = this.indexOf(a), this.models.splice(s, 1), this.length--, e.silent || (e.index = s, a.trigger("remove", a, this, e)), this._removeReference(a, e));
            return i ? t[0] : t
        },
        set: function(t, e) {
            e = n.defaults({},
            e, m),
            e.parse && (t = this.parse(t, e));
            var i = !n.isArray(t);
            t = i ? t ? [t] : [] : n.clone(t);
            var r, o, s, a, l, u, c, d = e.at,
            p = this.model,
            f = this.comparator && null == d && e.sort !== !1,
            g = n.isString(this.comparator) ? this.comparator: null,
            v = [],
            y = [],
            b = {},
            w = e.add,
            x = e.merge,
            k = e.remove,
            T = !f && w && k ? [] : !1;
            for (r = 0, o = t.length; o > r; r++) {
                if (l = t[r] || {},
                s = l instanceof h ? a = l: l[p.prototype.idAttribute || "id"], u = this.get(s)) k && (b[u.cid] = !0),
                x && (l = l === a ? a.attributes: l, e.parse && (l = u.parse(l, e)), u.set(l, e), f && !c && u.hasChanged(g) && (c = !0)),
                t[r] = u;
                else if (w) {
                    if (a = t[r] = this._prepareModel(l, e), !a) continue;
                    v.push(a),
                    this._addReference(a, e)
                }
                a = u || a,
                !T || !a.isNew() && b[a.id] || T.push(a),
                b[a.id] = !0
            }
            if (k) {
                for (r = 0, o = this.length; o > r; ++r) b[(a = this.models[r]).cid] || y.push(a);
                y.length && this.remove(y, e)
            }
            if (v.length || T && T.length) if (f && (c = !0), this.length += v.length, null != d) for (r = 0, o = v.length; o > r; r++) this.models.splice(d + r, 0, v[r]);
            else {
                T && (this.models.length = 0);
                var E = T || v;
                for (r = 0, o = E.length; o > r; r++) this.models.push(E[r])
            }
            if (c && this.sort({
                silent: !0
            }), !e.silent) {
                for (r = 0, o = v.length; o > r; r++)(a = v[r]).trigger("add", a, this, e); (c || T && T.length) && this.trigger("sort", this, e)
            }
            return i ? t[0] : t
        },
        reset: function(t, e) {
            e || (e = {});
            for (var i = 0,
            r = this.models.length; r > i; i++) this._removeReference(this.models[i], e);
            return e.previousModels = this.models,
            this._reset(),
            t = this.add(t, n.extend({
                silent: !0
            },
            e)),
            e.silent || this.trigger("reset", this, e),
            t
        },
        push: function(t, e) {
            return this.add(t, n.extend({
                at: this.length
            },
            e))
        },
        pop: function(t) {
            var e = this.at(this.length - 1);
            return this.remove(e, t),
            e
        },
        unshift: function(t, e) {
            return this.add(t, n.extend({
                at: 0
            },
            e))
        },
        shift: function(t) {
            var e = this.at(0);
            return this.remove(e, t),
            e
        },
        slice: function() {
            return s.apply(this.models, arguments)
        },
        get: function(t) {
            return null == t ? void 0 : this._byId[t] || this._byId[t.id] || this._byId[t.cid]
        },
        at: function(t) {
            return this.models[t]
        },
        where: function(t, e) {
            return n.isEmpty(t) ? e ? void 0 : [] : this[e ? "find": "filter"](function(e) {
                for (var n in t) if (t[n] !== e.get(n)) return ! 1;
                return ! 0
            })
        },
        findWhere: function(t) {
            return this.where(t, !0)
        },
        sort: function(t) {
            if (!this.comparator) throw new Error("Cannot sort a set without a comparator");
            return t || (t = {}),
            n.isString(this.comparator) || 1 === this.comparator.length ? this.models = this.sortBy(this.comparator, this) : this.models.sort(n.bind(this.comparator, this)),
            t.silent || this.trigger("sort", this, t),
            this
        },
        pluck: function(t) {
            return n.invoke(this.models, "get", t)
        },
        fetch: function(t) {
            t = t ? n.clone(t) : {},
            void 0 === t.parse && (t.parse = !0);
            var e = t.success,
            i = this;
            return t.success = function(n) {
                var r = t.reset ? "reset": "set";
                i[r](n, t),
                e && e(i, n, t),
                i.trigger("sync", i, n, t)
            },
            R(this, t),
            this.sync("read", this, t)
        },
        create: function(t, e) {
            if (e = e ? n.clone(e) : {},
            !(t = this._prepareModel(t, e))) return ! 1;
            e.wait || this.add(t, e);
            var i = this,
            r = e.success;
            return e.success = function(t, n) {
                e.wait && i.add(t, e),
                r && r(t, n, e)
            },
            t.save(null, e),
            t
        },
        parse: function(t, e) {
            return t
        },
        clone: function() {
            return new this.constructor(this.models)
        },
        _reset: function() {
            this.length = 0,
            this.models = [],
            this._byId = {}
        },
        _prepareModel: function(t, e) {
            if (t instanceof h) return t;
            e = e ? n.clone(e) : {},
            e.collection = this;
            var i = new this.model(t, e);
            return i.validationError ? (this.trigger("invalid", this, i.validationError, e), !1) : i
        },
        _addReference: function(t, e) {
            this._byId[t.cid] = t,
            null != t.id && (this._byId[t.id] = t),
            t.collection || (t.collection = this),
            t.on("all", this._onModelEvent, this)
        },
        _removeReference: function(t, e) {
            this === t.collection && delete t.collection,
            t.off("all", this._onModelEvent, this)
        },
        _onModelEvent: function(t, e, n, i) { ("add" !== t && "remove" !== t || n === this) && ("destroy" === t && this.remove(e, i), e && t === "change:" + e.idAttribute && (delete this._byId[e.previous(e.idAttribute)], null != e.id && (this._byId[e.id] = e)), this.trigger.apply(this, arguments))
        }
    });
    var v = ["forEach", "each", "map", "collect", "reduce", "foldl", "inject", "reduceRight", "foldr", "find", "detect", "filter", "select", "reject", "every", "all", "some", "any", "include", "contains", "invoke", "max", "min", "toArray", "size", "first", "head", "take", "initial", "rest", "tail", "drop", "last", "without", "difference", "indexOf", "shuffle", "lastIndexOf", "isEmpty", "chain", "sample"];
    n.each(v,
    function(t) {
        f.prototype[t] = function() {
            var e = s.call(arguments);
            return e.unshift(this.models),
            n[t].apply(n, e)
        }
    });
    var y = ["groupBy", "countBy", "sortBy", "indexBy"];
    n.each(y,
    function(t) {
        f.prototype[t] = function(e, i) {
            var r = n.isFunction(e) ? e: function(t) {
                return t.get(e)
            };
            return n[t](this.models, r, i)
        }
    });
    var b = e.View = function(t) {
        this.cid = n.uniqueId("view"),
        t || (t = {}),
        n.extend(this, n.pick(t, x)),
        this._ensureElement(),
        this.initialize.apply(this, arguments),
        this.delegateEvents()
    },
    w = /^(\S+)\s*(.*)$/,
    x = ["model", "collection", "el", "id", "attributes", "className", "tagName", "events"];
    n.extend(b.prototype, a, {
        tagName: "div",
        $: function(t) {
            return this.$el.find(t)
        },
        initialize: function() {},
        render: function() {
            return this
        },
        remove: function() {
            return this.$el.remove(),
            this.stopListening(),
            this
        },
        setElement: function(t, n) {
            return this.$el && this.undelegateEvents(),
            this.$el = t instanceof e.$ ? t: e.$(t),
            this.el = this.$el[0],
            n !== !1 && this.delegateEvents(),
            this
        },
        delegateEvents: function(t) {
            if (!t && !(t = n.result(this, "events"))) return this;
            this.undelegateEvents();
            for (var e in t) {
                var i = t[e];
                if (n.isFunction(i) || (i = this[t[e]]), i) {
                    var r = e.match(w),
                    o = r[1],
                    s = r[2];
                    i = n.bind(i, this),
                    o += ".delegateEvents" + this.cid,
                    "" === s ? this.$el.on(o, i) : this.$el.on(o, s, i)
                }
            }
            return this
        },
        undelegateEvents: function() {
            return this.$el.off(".delegateEvents" + this.cid),
            this
        },
        _ensureElement: function() {
            if (this.el) this.setElement(n.result(this, "el"), !1);
            else {
                var t = n.extend({},
                n.result(this, "attributes"));
                this.id && (t.id = n.result(this, "id")),
                this.className && (t["class"] = n.result(this, "className"));
                var i = e.$("<" + n.result(this, "tagName") + ">").attr(t);
                this.setElement(i, !1)
            }
        }
    }),
    e.sync = function(t, i, r) {
        var o = T[t];
        n.defaults(r || (r = {}), {
            emulateHTTP: e.emulateHTTP,
            emulateJSON: e.emulateJSON
        });
        var s = {
            type: o,
            dataType: "json"
        };
        if (r.url || (s.url = n.result(i, "url") || O()), null != r.data || !i || "create" !== t && "update" !== t && "patch" !== t || (s.contentType = "application/json", s.data = JSON.stringify(r.attrs || i.toJSON(r))), r.emulateJSON && (s.contentType = "application/x-www-form-urlencoded", s.data = s.data ? {
            model: s.data
        }: {}), r.emulateHTTP && ("PUT" === o || "DELETE" === o || "PATCH" === o)) {
            s.type = "POST",
            r.emulateJSON && (s.data._method = o);
            var a = r.beforeSend;
            r.beforeSend = function(t) {
                return t.setRequestHeader("X-HTTP-Method-Override", o),
                a ? a.apply(this, arguments) : void 0
            }
        }
        "GET" === s.type || r.emulateJSON || (s.processData = !1),
        "PATCH" === s.type && k && (s.xhr = function() {
            return new ActiveXObject("Microsoft.XMLHTTP")
        });
        var l = r.xhr = e.ajax(n.extend(s, r));
        return i.trigger("request", i, l, r),
        l
    };
    var k = !("undefined" == typeof window || !window.ActiveXObject || window.XMLHttpRequest && (new XMLHttpRequest).dispatchEvent),
    T = {
        create: "POST",
        update: "PUT",
        patch: "PATCH",
        "delete": "DELETE",
        read: "GET"
    };
    e.ajax = function() {
        return e.$.ajax.apply(e.$, arguments)
    };
    var E = e.Router = function(t) {
        t || (t = {}),
        t.routes && (this.routes = t.routes),
        this._bindRoutes(),
        this.initialize.apply(this, arguments)
    },
    C = /\((.*?)\)/g,
    $ = /(\(\?)?:\w+/g,
    _ = /\*\w+/g,
    S = /[\-{}\[\]+?.,\\\^$|#\s]/g;
    n.extend(E.prototype, a, {
        initialize: function() {},
        route: function(t, i, r) {
            n.isRegExp(t) || (t = this._routeToRegExp(t)),
            n.isFunction(i) && (r = i, i = ""),
            r || (r = this[i]);
            var o = this;
            return e.history.route(t,
            function(n) {
                var s = o._extractParameters(t, n);
                o.execute(r, s),
                o.trigger.apply(o, ["route:" + i].concat(s)),
                o.trigger("route", i, s),
                e.history.trigger("route", o, i, s)
            }),
            this
        },
        execute: function(t, e) {
            t && t.apply(this, e)
        },
        navigate: function(t, n) {
            return e.history.navigate(t, n),
            this
        },
        _bindRoutes: function() {
            if (this.routes) {
                this.routes = n.result(this, "routes");
                for (var t, e = n.keys(this.routes); null != (t = e.pop());) this.route(t, this.routes[t])
            }
        },
        _routeToRegExp: function(t) {
            return t = t.replace(S, "\\$&").replace(C, "(?:$1)?").replace($,
            function(t, e) {
                return e ? t: "([^/?]+)"
            }).replace(_, "([^?]*?)"),
            new RegExp("^" + t + "(?:\\?([\\s\\S]*))?$")
        },
        _extractParameters: function(t, e) {
            var i = t.exec(e).slice(1);
            return n.map(i,
            function(t, e) {
                return e === i.length - 1 ? t || null: t ? decodeURIComponent(t) : null
            })
        }
    });
    var A = e.History = function() {
        this.handlers = [],
        n.bindAll(this, "checkUrl"),
        "undefined" != typeof window && (this.location = window.location, this.history = window.history)
    },
    N = /^[#\/]|\s+$/g,
    D = /^\/+|\/+$/g,
    F = /msie [\w.]+/,
    L = /\/$/,
    j = /#.*$/;
    A.started = !1,
    n.extend(A.prototype, a, {
        interval: 50,
        atRoot: function() {
            return this.location.pathname.replace(/[^\/]$/, "$&/") === this.root
        },
        getHash: function(t) {
            var e = (t || this).location.href.match(/#(.*)$/);
            return e ? e[1] : ""
        },
        getFragment: function(t, e) {
            if (null == t) if (this._hasPushState || !this._wantsHashChange || e) {
                t = decodeURI(this.location.pathname + this.location.search);
                var n = this.root.replace(L, "");
                t.indexOf(n) || (t = t.slice(n.length))
            } else t = this.getHash();
            return t.replace(N, "")
        },
        start: function(t) {
            if (A.started) throw new Error("Backbone.history has already been started");
            A.started = !0,
            this.options = n.extend({
                root: "/"
            },
            this.options, t),
            this.root = this.options.root,
            this._wantsHashChange = this.options.hashChange !== !1,
            this._wantsPushState = !!this.options.pushState,
            this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);
            var i = this.getFragment(),
            r = document.documentMode,
            o = F.exec(navigator.userAgent.toLowerCase()) && (!r || 7 >= r);
            if (this.root = ("/" + this.root + "/").replace(D, "/"), o && this._wantsHashChange) {
                var s = e.$('<iframe src="javascript:0" tabindex="-1">');
                this.iframe = s.hide().appendTo("body")[0].contentWindow,
                this.navigate(i)
            }
            this._hasPushState ? e.$(window).on("popstate", this.checkUrl) : this._wantsHashChange && "onhashchange" in window && !o ? e.$(window).on("hashchange", this.checkUrl) : this._wantsHashChange && (this._checkUrlInterval = setInterval(this.checkUrl, this.interval)),
            this.fragment = i;
            var a = this.location;
            if (this._wantsHashChange && this._wantsPushState) {
                if (!this._hasPushState && !this.atRoot()) return this.fragment = this.getFragment(null, !0),
                this.location.replace(this.root + "#" + this.fragment),
                !0;
                this._hasPushState && this.atRoot() && a.hash && (this.fragment = this.getHash().replace(N, ""), this.history.replaceState({},
                document.title, this.root + this.fragment))
            }
            return this.options.silent ? void 0 : this.loadUrl()
        },
        stop: function() {
            e.$(window).off("popstate", this.checkUrl).off("hashchange", this.checkUrl),
            this._checkUrlInterval && clearInterval(this._checkUrlInterval),
            A.started = !1
        },
        route: function(t, e) {
            this.handlers.unshift({
                route: t,
                callback: e
            })
        },
        checkUrl: function(t) {
            var e = this.getFragment();
            return e === this.fragment && this.iframe && (e = this.getFragment(this.getHash(this.iframe))),
            e === this.fragment ? !1 : (this.iframe && this.navigate(e), void this.loadUrl())
        },
        loadUrl: function(t) {
            return t = this.fragment = this.getFragment(t),
            n.any(this.handlers,
            function(e) {
                return e.route.test(t) ? (e.callback(t), !0) : void 0
            })
        },
        navigate: function(t, e) {
            if (!A.started) return ! 1;
            e && e !== !0 || (e = {
                trigger: !!e
            });
            var n = this.root + (t = this.getFragment(t || ""));
            if (t = t.replace(j, ""), this.fragment !== t) {
                if (this.fragment = t, "" === t && "/" !== n && (n = n.slice(0, -1)), this._hasPushState) this.history[e.replace ? "replaceState": "pushState"]({},
                document.title, n);
                else {
                    if (!this._wantsHashChange) return this.location.assign(n);
                    this._updateHash(this.location, t, e.replace),
                    this.iframe && t !== this.getFragment(this.getHash(this.iframe)) && (e.replace || this.iframe.document.open().close(), this._updateHash(this.iframe.location, t, e.replace))
                }
                return e.trigger ? this.loadUrl(t) : void 0
            }
        },
        _updateHash: function(t, e, n) {
            if (n) {
                var i = t.href.replace(/(javascript:|#).*$/, "");
                t.replace(i + "#" + e)
            } else t.hash = "#" + e
        }
    }),
    e.history = new A;
    var I = function(t, e) {
        var i, r = this;
        i = t && n.has(t, "constructor") ? t.constructor: function() {
            return r.apply(this, arguments)
        },
        n.extend(i, r, e);
        var o = function() {
            this.constructor = i
        };
        return o.prototype = r.prototype,
        i.prototype = new o,
        t && n.extend(i.prototype, t),
        i.__super__ = r.prototype,
        i
    };
    h.extend = f.extend = E.extend = b.extend = A.extend = I;
    var O = function() {
        throw new Error('A "url" property or function must be specified')
    },
    R = function(t, e) {
        var n = e.error;
        e.error = function(i) {
            n && n(t, i, e),
            t.trigger("error", t, i, e)
        }
    };
    return e
}),
function(t) {
    function e(t) {
        var e = 37,
        r = 39;
        if (("BODY" == t.target.nodeName || "HTML" == t.target.nodeName) && !(t.ctrlKey || t.altKey || t.shiftKey || t.metaKey)) {
            var o = t.which;
            o == e ? n() : o == r && i()
        }
    }
    function n() {
        var e = t(".pagination .previous_page a").attr("href");
        e && e != document.location && "#" != e && Turbolinks.visit(e)
    }
    function i() {
        var e = t(".pagination .next_page a").attr("href");
        e && e != document.location && "#" != e && Turbolinks.visit(e)
    }
    t(document).off("keydown.will_paginate"),
    t(document).on("keydown.will_paginate", e)
} (jQuery),
/*
 * timeago: a jQuery plugin, version: 0.9.3 (2011-01-21)
 * @requires jQuery v1.2.3 or later
 *
 * Timeago is a jQuery plugin that makes it easy to support automatically
 * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
 *
 * For usage and examples, visit:
 * http://timeago.yarp.com/
 *
 * Licensed under the MIT:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Copyright (c) 2008-2011, Ryan McGeary (ryanonjavascript -[at]- mcgeary [*dot*] org)
 */
function(t) {
    function e() {
        var e = n(this);
        return isNaN(e.datetime) || t(this).text(i(e.datetime)),
        this
    }
    function n(e) {
        if (e = t(e), !e.data("timeago")) {
            e.data("timeago", {
                datetime: o.datetime(e)
            });
            var n = t.trim(e.text());
            n.length > 0 && e.attr("title", n)
        }
        return e.data("timeago")
    }
    function i(t) {
        return o.inWords(r(t))
    }
    function r(t) {
        return (new Date).getTime() - t.getTime()
    }
    t.timeago = function(e) {
        return i(e instanceof Date ? e: "string" == typeof e ? t.timeago.parse(e) : t.timeago.datetime(e))
    };
    var o = t.timeago;
    t.extend(t.timeago, {
        settings: {
            refreshMillis: 6e4,
            allowFuture: !1,
            strings: {
                prefixAgo: null,
                prefixFromNow: null,
                suffixAgo: "ago",
                suffixFromNow: "from now",
                seconds: "less than a minute",
                minute: "about a minute",
                minutes: "%d minutes",
                hour: "about an hour",
                hours: "about %d hours",
                day: "a day",
                days: "%d days",
                month: "about a month",
                months: "%d months",
                year: "about a year",
                years: "%d years",
                numbers: [],
                formatter: null
            }
        },
        inWords: function(e) {
            function n(n, r) {
                var o = t.isFunction(n) ? n(r, e) : n,
                s = t.isFunction(i.numbers) ? i.numbers(r) : i.numbers && i.numbers[r] || r;
                return o.replace(/%d/i, s)
            }
            var i = this.settings.strings,
            r = i.prefixAgo,
            o = i.suffixAgo;
            this.settings.allowFuture && (0 > e && (r = i.prefixFromNow, o = i.suffixFromNow), e = Math.abs(e));
            var s = e / 1e3,
            a = s / 60,
            l = a / 60,
            u = l / 24,
            c = u / 365,
            d = 45 > s && n(i.seconds, Math.round(s)) || 90 > s && n(i.minute, 1) || 45 > a && n(i.minutes, Math.round(a)) || 90 > a && n(i.hour, 1) || 24 > l && n(i.hours, Math.round(l)) || 48 > l && n(i.day, 1) || 30 > u && n(i.days, Math.floor(u)) || 60 > u && n(i.month, 1) || 365 > u && n(i.months, Math.floor(u / 30)) || 2 > c && n(i.year, 1) || n(i.years, Math.floor(c));
            return t.isFunction(i.formatter) ? i.formatter(r, d, o) : t.trim([r, d, o].join(" "))
        },
        parse: function(e) {
            var n = t.trim(e);
            return n = n.replace(/\.\d\d\d+/, ""),
            n = n.replace(/-/, "/").replace(/-/, "/"),
            n = n.replace(/T/, " ").replace(/Z/, " UTC"),
            n = n.replace(/([\+\-]\d\d)\:?(\d\d)/, " $1$2"),
            new Date(n)
        },
        datetime: function(e) {
            var n = "time" === t(e).get(0).tagName.toLowerCase(),
            i = n ? t(e).attr("datetime") : t(e).attr("title");
            return o.parse(i)
        }
    }),
    t.fn.timeago = function() {
        var t = this;
        t.each(e);
        var n = o.settings;
        return n.refreshMillis > 0 && setInterval(function() {
            t.each(e)
        },
        n.refreshMillis),
        t
    },
    document.createElement("abbr"),
    document.createElement("time")
} (jQuery),
function() {
    var t = {
        "zh-CN": {
            prefixAgo: null,
            prefixFromNow: null,
            suffixAgo: "\u524d",
            suffixFromNow: "\u521a\u521a",
            seconds: "\u4e0d\u5230 1 \u5206\u949f",
            minute: "\u7ea6 1 \u5206\u949f",
            minutes: "%d \u5206\u949f",
            hour: "1 \u5c0f\u65f6",
            hours: "%d \u5c0f\u65f6",
            day: "1 \u5929",
            days: "%d \u5929",
            month: "1 \u6708",
            months: "%d \u6708",
            year: "1 \u5e74",
            years: "%d \u5e74",
            numbers: [],
            formatter: function(t, e, n) {
                return [t, e, n].join("")
            }
        },
        en: {
            prefixAgo: null,
            prefixFromNow: null,
            suffixAgo: "ago",
            suffixFromNow: "one second",
            seconds: "few seconds",
            minute: "one minute",
            minutes: "%d minutes",
            hour: "one hour",
            hours: "%d hours",
            day: "one day",
            days: "%d days",
            month: "one month",
            months: "%d months",
            year: "one year",
            years: "%d years",
            numbers: [],
            formatter: function(t, e, n) {
                return [t, e, n].join(" ")
            }
        },
        "zh-TW": {
            prefixAgo: null,
            prefixFromNow: null,
            suffixAgo: "\u524d",
            suffixFromNow: "\u525b\u525b",
            seconds: "\u4e0d\u5230 1 \u5206\u9418",
            minute: "\u7d04 1 \u5206\u9418",
            minutes: "%d \u5206\u9418",
            hour: "1 \u5c0f\u6642",
            hours: "%d \u5c0f\u6642",
            day: "1 \u5929",
            days: "%d \u5929",
            month: "1 \u6708",
            months: "%d \u6708",
            year: "1 \u5e74",
            years: "%d \u5e74",
            numbers: [],
            formatter: function(t, e, n) {
                return [t, e, n].join("")
            }
        }
    };
    $("document").ready(function() {
        var e = t[App.locale];
        e && (jQuery.timeago.settings.strings = e)
    })
} (),
/*
 * jQuery Hotkeys Plugin
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Based upon the plugin by Tzury Bar Yochay:
 * http://github.com/tzuryby/hotkeys (This Location Is Deprecated)
 * https://github.com/tzuryby/jquery.hotkeys
 *
 * Original idea by:
 * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
*/
function(t) {
    function e(e) {
        if ("string" == typeof e.data) {
            var n = e.handler,
            i = e.data.toLowerCase().split(" ");
            e.handler = function(e) {
                if (this === e.target || !/textarea|select/i.test(e.target.nodeName) && "text" !== e.target.type) {
                    var r = "keypress" !== e.type && t.hotkeys.specialKeys[e.which],
                    o = String.fromCharCode(e.which).toLowerCase(),
                    s = "",
                    a = {};
                    e.altKey && "alt" !== r && (s += "alt+"),
                    e.ctrlKey && "ctrl" !== r && (s += "ctrl+"),
                    e.metaKey && !e.ctrlKey && "meta" !== r && (s += "meta+"),
                    e.shiftKey && "shift" !== r && (s += "shift+"),
                    r ? a[s + r] = !0 : (a[s + o] = !0, a[s + t.hotkeys.shiftNums[o]] = !0, "shift+" === s && (a[t.hotkeys.shiftNums[o]] = !0));
                    for (var l = 0,
                    u = i.length; u > l; l++) if (a[i[l]]) return n.apply(this, arguments)
                }
            }
        }
    }
    t.hotkeys = {
        version: "0.8",
        specialKeys: {
            8 : "backspace",
            9 : "tab",
            13 : "return",
            16 : "shift",
            17 : "ctrl",
            18 : "alt",
            19 : "pause",
            20 : "capslock",
            27 : "esc",
            32 : "space",
            33 : "pageup",
            34 : "pagedown",
            35 : "end",
            36 : "home",
            37 : "left",
            38 : "up",
            39 : "right",
            40 : "down",
            45 : "insert",
            46 : "del",
            96 : "0",
            97 : "1",
            98 : "2",
            99 : "3",
            100 : "4",
            101 : "5",
            102 : "6",
            103 : "7",
            104 : "8",
            105 : "9",
            106 : "*",
            107 : "+",
            109 : "-",
            110 : ".",
            111 : "/",
            112 : "f1",
            113 : "f2",
            114 : "f3",
            115 : "f4",
            116 : "f5",
            117 : "f6",
            118 : "f7",
            119 : "f8",
            120 : "f9",
            121 : "f10",
            122 : "f11",
            123 : "f12",
            144 : "numlock",
            145 : "scroll",
            191 : "/",
            224 : "meta"
        },
        shiftNums: {
            "`": "~",
            1 : "!",
            2 : "@",
            3 : "#",
            4 : "$",
            5 : "%",
            6 : "^",
            7 : "&",
            8 : "*",
            9 : "(",
            0 : ")",
            "-": "_",
            "=": "+",
            ";": ": ",
            "'": '"',
            ",": "<",
            ".": ">",
            "/": "?",
            "\\": "|"
        }
    },
    t.each(["keydown", "keyup", "keypress"],
    function() {
        t.event.special[this] = {
            add: e
        }
    })
} (jQuery),
function(t) {
    t.fn.autogrow = function(e) {
        return this.filter("textarea").each(function() {
            var e = t(this),
            n = e.height(),
            i = (e.css("lineHeight"), t("<div></div>").css({
                position: "absolute",
                top: -1e4,
                left: -1e4,
                width: t(this).width(),
                fontSize: e.css("fontSize"),
                fontFamily: e.css("fontFamily"),
                lineHeight: e.css("lineHeight"),
                resize: "none"
            }).appendTo(document.body)),
            r = function() {
                var e = this.value.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/&/g, "&amp;").replace(/\n/g, "<br/>");
                i.html(e),
                t(this).css("height", Math.max(i.height() + 20, n))
            };
            t(this).change(r).keyup(r).keydown(r),
            r.apply(this)
        }),
        this
    }
} (jQuery),
/*
 *
 * More info at [www.dropzonejs.com](http://www.dropzonejs.com)
 *
 * Copyright (c) 2012, Matias Meno
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 */
function() {
    var t, e, n, i, r, o, s, a, l = [].slice,
    u = {}.hasOwnProperty,
    c = function(t, e) {
        function n() {
            this.constructor = t
        }
        for (var i in e) u.call(e, i) && (t[i] = e[i]);
        return n.prototype = e.prototype,
        t.prototype = new n,
        t.__super__ = e.prototype,
        t
    };
    s = function() {},
    e = function() {
        function t() {}
        return t.prototype.addEventListener = t.prototype.on,
        t.prototype.on = function(t, e) {
            return this._callbacks = this._callbacks || {},
            this._callbacks[t] || (this._callbacks[t] = []),
            this._callbacks[t].push(e),
            this
        },
        t.prototype.emit = function() {
            var t, e, n, i, r, o;
            if (i = arguments[0], t = 2 <= arguments.length ? l.call(arguments, 1) : [], this._callbacks = this._callbacks || {},
            n = this._callbacks[i]) for (r = 0, o = n.length; o > r; r++) e = n[r],
            e.apply(this, t);
            return this
        },
        t.prototype.removeListener = t.prototype.off,
        t.prototype.removeAllListeners = t.prototype.off,
        t.prototype.removeEventListener = t.prototype.off,
        t.prototype.off = function(t, e) {
            var n, i, r, o, s;
            if (!this._callbacks || 0 === arguments.length) return this._callbacks = {},
            this;
            if (i = this._callbacks[t], !i) return this;
            if (1 === arguments.length) return delete this._callbacks[t],
            this;
            for (r = o = 0, s = i.length; s > o; r = ++o) if (n = i[r], n === e) {
                i.splice(r, 1);
                break
            }
            return this
        },
        t
    } (),
    t = function(t) {
        function n(t, e) {
            var r, o, s;
            if (this.element = t, this.version = n.version, this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, ""), this.clickableElements = [], this.listeners = [], this.files = [], "string" == typeof this.element && (this.element = document.querySelector(this.element)), !this.element || null == this.element.nodeType) throw new Error("Invalid dropzone element.");
            if (this.element.dropzone) throw new Error("Dropzone already attached.");
            if (n.instances.push(this), this.element.dropzone = this, r = null != (s = n.optionsForElement(this.element)) ? s: {},
            this.options = i({},
            this.defaultOptions, r, null != e ? e: {}), this.options.forceFallback || !n.isBrowserSupported()) return this.options.fallback.call(this);
            if (null == this.options.url && (this.options.url = this.element.getAttribute("action")), !this.options.url) throw new Error("No URL provided.");
            if (this.options.acceptedFiles && this.options.acceptedMimeTypes) throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");
            this.options.acceptedMimeTypes && (this.options.acceptedFiles = this.options.acceptedMimeTypes, delete this.options.acceptedMimeTypes),
            this.options.method = this.options.method.toUpperCase(),
            (o = this.getExistingFallback()) && o.parentNode && o.parentNode.removeChild(o),
            this.options.previewsContainer !== !1 && (this.options.previewsContainer ? this.previewsContainer = n.getElement(this.options.previewsContainer, "previewsContainer") : this.previewsContainer = this.element),
            this.options.clickable && (this.options.clickable === !0 ? this.clickableElements = [this.element] : this.clickableElements = n.getElements(this.options.clickable, "clickable")),
            this.init()
        }
        var i, r;
        return c(n, t),
        n.prototype.Emitter = e,
        n.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"],
        n.prototype.defaultOptions = {
            url: null,
            method: "post",
            withCredentials: !1,
            parallelUploads: 2,
            uploadMultiple: !1,
            maxFilesize: 256,
            paramName: "file",
            createImageThumbnails: !0,
            maxThumbnailFilesize: 10,
            thumbnailWidth: 120,
            thumbnailHeight: 120,
            filesizeBase: 1e3,
            maxFiles: null,
            params: {},
            clickable: !0,
            ignoreHiddenFiles: !0,
            acceptedFiles: null,
            acceptedMimeTypes: null,
            autoProcessQueue: !0,
            autoQueue: !0,
            addRemoveLinks: !1,
            previewsContainer: null,
            hiddenInputContainer: "body",
            capture: null,
            dictDefaultMessage: "Drop files here to upload",
            dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",
            dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",
            dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",
            dictInvalidFileType: "You can't upload files of this type.",
            dictResponseError: "Server responded with {{statusCode}} code.",
            dictCancelUpload: "Cancel upload",
            dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?",
            dictRemoveFile: "Remove file",
            dictRemoveFileConfirmation: null,
            dictMaxFilesExceeded: "You can not upload any more files.",
            accept: function(t, e) {
                return e()
            },
            init: function() {
                return s
            },
            forceFallback: !1,
            fallback: function() {
                var t, e, i, r, o, s;
                for (this.element.className = "" + this.element.className + " dz-browser-not-supported", s = this.element.getElementsByTagName("div"), r = 0, o = s.length; o > r; r++) t = s[r],
                /(^| )dz-message($| )/.test(t.className) && (e = t, t.className = "dz-message");
                return e || (e = n.createElement('<div class="dz-message"><span></span></div>'), this.element.appendChild(e)),
                i = e.getElementsByTagName("span")[0],
                i && (null != i.textContent ? i.textContent = this.options.dictFallbackMessage: null != i.innerText && (i.innerText = this.options.dictFallbackMessage)),
                this.element.appendChild(this.getFallbackForm())
            },
            resize: function(t) {
                var e, n, i;
                return e = {
                    srcX: 0,
                    srcY: 0,
                    srcWidth: t.width,
                    srcHeight: t.height
                },
                n = t.width / t.height,
                e.optWidth = this.options.thumbnailWidth,
                e.optHeight = this.options.thumbnailHeight,
                null == e.optWidth && null == e.optHeight ? (e.optWidth = e.srcWidth, e.optHeight = e.srcHeight) : null == e.optWidth ? e.optWidth = n * e.optHeight: null == e.optHeight && (e.optHeight = 1 / n * e.optWidth),
                i = e.optWidth / e.optHeight,
                t.height < e.optHeight || t.width < e.optWidth ? (e.trgHeight = e.srcHeight, e.trgWidth = e.srcWidth) : n > i ? (e.srcHeight = t.height, e.srcWidth = e.srcHeight * i) : (e.srcWidth = t.width, e.srcHeight = e.srcWidth / i),
                e.srcX = (t.width - e.srcWidth) / 2,
                e.srcY = (t.height - e.srcHeight) / 2,
                e
            },
            drop: function(t) {
                return this.element.classList.remove("dz-drag-hover")
            },
            dragstart: s,
            dragend: function(t) {
                return this.element.classList.remove("dz-drag-hover")
            },
            dragenter: function(t) {
                return this.element.classList.add("dz-drag-hover")
            },
            dragover: function(t) {
                return this.element.classList.add("dz-drag-hover")
            },
            dragleave: function(t) {
                return this.element.classList.remove("dz-drag-hover")
            },
            paste: s,
            reset: function() {
                return this.element.classList.remove("dz-started")
            },
            addedfile: function(t) {
                var e, i, r, o, s, a, l, u, c, d, h, p, f;
                if (this.element === this.previewsContainer && this.element.classList.add("dz-started"), this.previewsContainer) {
                    for (t.previewElement = n.createElement(this.options.previewTemplate.trim()), t.previewTemplate = t.previewElement, this.previewsContainer.appendChild(t.previewElement), d = t.previewElement.querySelectorAll("[data-dz-name]"), o = 0, l = d.length; l > o; o++) e = d[o],
                    e.textContent = t.name;
                    for (h = t.previewElement.querySelectorAll("[data-dz-size]"), s = 0, u = h.length; u > s; s++) e = h[s],
                    e.innerHTML = this.filesize(t.size);
                    for (this.options.addRemoveLinks && (t._removeLink = n.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>' + this.options.dictRemoveFile + "</a>"), t.previewElement.appendChild(t._removeLink)), i = function(e) {
                        return function(i) {
                            return i.preventDefault(),
                            i.stopPropagation(),
                            t.status === n.UPLOADING ? n.confirm(e.options.dictCancelUploadConfirmation,
                            function() {
                                return e.removeFile(t)
                            }) : e.options.dictRemoveFileConfirmation ? n.confirm(e.options.dictRemoveFileConfirmation,
                            function() {
                                return e.removeFile(t)
                            }) : e.removeFile(t)
                        }
                    } (this), p = t.previewElement.querySelectorAll("[data-dz-remove]"), f = [], a = 0, c = p.length; c > a; a++) r = p[a],
                    f.push(r.addEventListener("click", i));
                    return f
                }
            },
            removedfile: function(t) {
                var e;
                return t.previewElement && null != (e = t.previewElement) && e.parentNode.removeChild(t.previewElement),
                this._updateMaxFilesReachedClass()
            },
            thumbnail: function(t, e) {
                var n, i, r, o;
                if (t.previewElement) {
                    for (t.previewElement.classList.remove("dz-file-preview"), o = t.previewElement.querySelectorAll("[data-dz-thumbnail]"), i = 0, r = o.length; r > i; i++) n = o[i],
                    n.alt = t.name,
                    n.src = e;
                    return setTimeout(function(e) {
                        return function() {
                            return t.previewElement.classList.add("dz-image-preview")
                        }
                    } (this), 1)
                }
            },
            error: function(t, e) {
                var n, i, r, o, s;
                if (t.previewElement) {
                    for (t.previewElement.classList.add("dz-error"), "String" != typeof e && e.error && (e = e.error), o = t.previewElement.querySelectorAll("[data-dz-errormessage]"), s = [], i = 0, r = o.length; r > i; i++) n = o[i],
                    s.push(n.textContent = e);
                    return s
                }
            },
            errormultiple: s,
            processing: function(t) {
                return t.previewElement && (t.previewElement.classList.add("dz-processing"), t._removeLink) ? t._removeLink.textContent = this.options.dictCancelUpload: void 0
            },
            processingmultiple: s,
            uploadprogress: function(t, e, n) {
                var i, r, o, s, a;
                if (t.previewElement) {
                    for (s = t.previewElement.querySelectorAll("[data-dz-uploadprogress]"), a = [], r = 0, o = s.length; o > r; r++) i = s[r],
                    "PROGRESS" === i.nodeName ? a.push(i.value = e) : a.push(i.style.width = "" + e + "%");
                    return a
                }
            },
            totaluploadprogress: s,
            sending: s,
            sendingmultiple: s,
            success: function(t) {
                return t.previewElement ? t.previewElement.classList.add("dz-success") : void 0
            },
            successmultiple: s,
            canceled: function(t) {
                return this.emit("error", t, "Upload canceled.")
            },
            canceledmultiple: s,
            complete: function(t) {
                return t._removeLink && (t._removeLink.textContent = this.options.dictRemoveFile),
                t.previewElement ? t.previewElement.classList.add("dz-complete") : void 0
            },
            completemultiple: s,
            maxfilesexceeded: s,
            maxfilesreached: s,
            queuecomplete: s,
            addedfiles: s,
            previewTemplate: '<div class="dz-preview dz-file-preview">\n  <div class="dz-image"><img data-dz-thumbnail /></div>\n  <div class="dz-details">\n    <div class="dz-size"><span data-dz-size></span></div>\n    <div class="dz-filename"><span data-dz-name></span></div>\n  </div>\n  <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n  <div class="dz-error-message"><span data-dz-errormessage></span></div>\n  <div class="dz-success-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Check</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>\n      </g>\n    </svg>\n  </div>\n  <div class="dz-error-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Error</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <g id="Check-+-Oval-2" sketch:type="MSLayerGroup" stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">\n          <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" sketch:type="MSShapeGroup"></path>\n        </g>\n      </g>\n    </svg>\n  </div>\n</div>'
        },
        i = function() {
            var t, e, n, i, r, o, s;
            for (i = arguments[0], n = 2 <= arguments.length ? l.call(arguments, 1) : [], o = 0, s = n.length; s > o; o++) {
                e = n[o];
                for (t in e) r = e[t],
                i[t] = r
            }
            return i
        },
        n.prototype.getAcceptedFiles = function() {
            var t, e, n, i, r;
            for (i = this.files, r = [], e = 0, n = i.length; n > e; e++) t = i[e],
            t.accepted && r.push(t);
            return r
        },
        n.prototype.getRejectedFiles = function() {
            var t, e, n, i, r;
            for (i = this.files, r = [], e = 0, n = i.length; n > e; e++) t = i[e],
            t.accepted || r.push(t);
            return r
        },
        n.prototype.getFilesWithStatus = function(t) {
            var e, n, i, r, o;
            for (r = this.files, o = [], n = 0, i = r.length; i > n; n++) e = r[n],
            e.status === t && o.push(e);
            return o
        },
        n.prototype.getQueuedFiles = function() {
            return this.getFilesWithStatus(n.QUEUED)
        },
        n.prototype.getUploadingFiles = function() {
            return this.getFilesWithStatus(n.UPLOADING)
        },
        n.prototype.getAddedFiles = function() {
            return this.getFilesWithStatus(n.ADDED)
        },
        n.prototype.getActiveFiles = function() {
            var t, e, i, r, o;
            for (r = this.files, o = [], e = 0, i = r.length; i > e; e++) t = r[e],
            (t.status === n.UPLOADING || t.status === n.QUEUED) && o.push(t);
            return o
        },
        n.prototype.init = function() {
            var t, e, i, r, o, s, a;
            for ("form" === this.element.tagName && this.element.setAttribute("enctype", "multipart/form-data"), this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message") && this.element.appendChild(n.createElement('<div class="dz-default dz-message"><span>' + this.options.dictDefaultMessage + "</span></div>")), this.clickableElements.length && (i = function(t) {
                return function() {
                    return t.hiddenFileInput && t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),
                    t.hiddenFileInput = document.createElement("input"),
                    t.hiddenFileInput.setAttribute("type", "file"),
                    (null == t.options.maxFiles || t.options.maxFiles > 1) && t.hiddenFileInput.setAttribute("multiple", "multiple"),
                    t.hiddenFileInput.className = "dz-hidden-input",
                    null != t.options.acceptedFiles && t.hiddenFileInput.setAttribute("accept", t.options.acceptedFiles),
                    null != t.options.capture && t.hiddenFileInput.setAttribute("capture", t.options.capture),
                    t.hiddenFileInput.style.visibility = "hidden",
                    t.hiddenFileInput.style.position = "absolute",
                    t.hiddenFileInput.style.top = "0",
                    t.hiddenFileInput.style.left = "0",
                    t.hiddenFileInput.style.height = "0",
                    t.hiddenFileInput.style.width = "0",
                    document.querySelector(t.options.hiddenInputContainer).appendChild(t.hiddenFileInput),
                    t.hiddenFileInput.addEventListener("change",
                    function() {
                        var e, n, r, o;
                        if (n = t.hiddenFileInput.files, n.length) for (r = 0, o = n.length; o > r; r++) e = n[r],
                        t.addFile(e);
                        return t.emit("addedfiles", n),
                        i()
                    })
                }
            } (this))(), this.URL = null != (s = window.URL) ? s: window.webkitURL, a = this.events, r = 0, o = a.length; o > r; r++) t = a[r],
            this.on(t, this.options[t]);
            return this.on("uploadprogress",
            function(t) {
                return function() {
                    return t.updateTotalUploadProgress()
                }
            } (this)),
            this.on("removedfile",
            function(t) {
                return function() {
                    return t.updateTotalUploadProgress()
                }
            } (this)),
            this.on("canceled",
            function(t) {
                return function(e) {
                    return t.emit("complete", e)
                }
            } (this)),
            this.on("complete",
            function(t) {
                return function(e) {
                    return 0 === t.getAddedFiles().length && 0 === t.getUploadingFiles().length && 0 === t.getQueuedFiles().length ? setTimeout(function() {
                        return t.emit("queuecomplete")
                    },
                    0) : void 0
                }
            } (this)),
            e = function(t) {
                return t.stopPropagation(),
                t.preventDefault ? t.preventDefault() : t.returnValue = !1
            },
            this.listeners = [{
                element: this.element,
                events: {
                    dragstart: function(t) {
                        return function(e) {
                            return t.emit("dragstart", e)
                        }
                    } (this),
                    dragenter: function(t) {
                        return function(n) {
                            return e(n),
                            t.emit("dragenter", n)
                        }
                    } (this),
                    dragover: function(t) {
                        return function(n) {
                            var i;
                            try {
                                i = n.dataTransfer.effectAllowed
                            } catch(r) {}
                            return n.dataTransfer.dropEffect = "move" === i || "linkMove" === i ? "move": "copy",
                            e(n),
                            t.emit("dragover", n)
                        }
                    } (this),
                    dragleave: function(t) {
                        return function(e) {
                            return t.emit("dragleave", e)
                        }
                    } (this),
                    drop: function(t) {
                        return function(n) {
                            return e(n),
                            t.drop(n)
                        }
                    } (this),
                    dragend: function(t) {
                        return function(e) {
                            return t.emit("dragend", e)
                        }
                    } (this)
                }
            }],
            this.clickableElements.forEach(function(t) {
                return function(e) {
                    return t.listeners.push({
                        element: e,
                        events: {
                            click: function(i) {
                                return (e !== t.element || i.target === t.element || n.elementInside(i.target, t.element.querySelector(".dz-message"))) && t.hiddenFileInput.click(),
                                !0
                            }
                        }
                    })
                }
            } (this)),
            this.enable(),
            this.options.init.call(this)
        },
        n.prototype.destroy = function() {
            var t;
            return this.disable(),
            this.removeAllFiles(!0),
            (null != (t = this.hiddenFileInput) ? t.parentNode: void 0) && (this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput), this.hiddenFileInput = null),
            delete this.element.dropzone,
            n.instances.splice(n.instances.indexOf(this), 1)
        },
        n.prototype.updateTotalUploadProgress = function() {
            var t, e, n, i, r, o, s, a;
            if (i = 0, n = 0, t = this.getActiveFiles(), t.length) {
                for (a = this.getActiveFiles(), o = 0, s = a.length; s > o; o++) e = a[o],
                i += e.upload.bytesSent,
                n += e.upload.total;
                r = 100 * i / n
            } else r = 100;
            return this.emit("totaluploadprogress", r, n, i)
        },
        n.prototype._getParamName = function(t) {
            return "function" == typeof this.options.paramName ? this.options.paramName(t) : "" + this.options.paramName + (this.options.uploadMultiple ? "[" + t + "]": "")
        },
        n.prototype.getFallbackForm = function() {
            var t, e, i, r;
            return (t = this.getExistingFallback()) ? t: (i = '<div class="dz-fallback">', this.options.dictFallbackText && (i += "<p>" + this.options.dictFallbackText + "</p>"), i += '<input type="file" name="' + this._getParamName(0) + '" ' + (this.options.uploadMultiple ? 'multiple="multiple"': void 0) + ' /><input type="submit" value="Upload!"></div>', e = n.createElement(i), "FORM" !== this.element.tagName ? (r = n.createElement('<form action="' + this.options.url + '" enctype="multipart/form-data" method="' + this.options.method + '"></form>'), r.appendChild(e)) : (this.element.setAttribute("enctype", "multipart/form-data"), this.element.setAttribute("method", this.options.method)), null != r ? r: e)
        },
        n.prototype.getExistingFallback = function() {
            var t, e, n, i, r, o;
            for (e = function(t) {
                var e, n, i;
                for (n = 0, i = t.length; i > n; n++) if (e = t[n], /(^| )fallback($| )/.test(e.className)) return e
            },
            o = ["div", "form"], i = 0, r = o.length; r > i; i++) if (n = o[i], t = e(this.element.getElementsByTagName(n))) return t
        },
        n.prototype.setupEventListeners = function() {
            var t, e, n, i, r, o, s;
            for (o = this.listeners, s = [], i = 0, r = o.length; r > i; i++) t = o[i],
            s.push(function() {
                var i, r;
                i = t.events,
                r = [];
                for (e in i) n = i[e],
                r.push(t.element.addEventListener(e, n, !1));
                return r
            } ());
            return s
        },
        n.prototype.removeEventListeners = function() {
            var t, e, n, i, r, o, s;
            for (o = this.listeners, s = [], i = 0, r = o.length; r > i; i++) t = o[i],
            s.push(function() {
                var i, r;
                i = t.events,
                r = [];
                for (e in i) n = i[e],
                r.push(t.element.removeEventListener(e, n, !1));
                return r
            } ());
            return s
        },
        n.prototype.disable = function() {
            var t, e, n, i, r;
            for (this.clickableElements.forEach(function(t) {
                return t.classList.remove("dz-clickable")
            }), this.removeEventListeners(), i = this.files, r = [], e = 0, n = i.length; n > e; e++) t = i[e],
            r.push(this.cancelUpload(t));
            return r
        },
        n.prototype.enable = function() {
            return this.clickableElements.forEach(function(t) {
                return t.classList.add("dz-clickable")
            }),
            this.setupEventListeners()
        },
        n.prototype.filesize = function(t) {
            var e, n, i, r, o, s, a, l;
            if (i = 0, r = "b", t > 0) {
                for (s = ["TB", "GB", "MB", "KB", "b"], n = a = 0, l = s.length; l > a; n = ++a) if (o = s[n], e = Math.pow(this.options.filesizeBase, 4 - n) / 10, t >= e) {
                    i = t / Math.pow(this.options.filesizeBase, 4 - n),
                    r = o;
                    break
                }
                i = Math.round(10 * i) / 10
            }
            return "<strong>" + i + "</strong> " + r
        },
        n.prototype._updateMaxFilesReachedClass = function() {
            return null != this.options.maxFiles && this.getAcceptedFiles().length >= this.options.maxFiles ? (this.getAcceptedFiles().length === this.options.maxFiles && this.emit("maxfilesreached", this.files), this.element.classList.add("dz-max-files-reached")) : this.element.classList.remove("dz-max-files-reached")
        },
        n.prototype.drop = function(t) {
            var e, n;
            t.dataTransfer && (this.emit("drop", t), e = t.dataTransfer.files, this.emit("addedfiles", e), e.length && (n = t.dataTransfer.items, n && n.length && null != n[0].webkitGetAsEntry ? this._addFilesFromItems(n) : this.handleFiles(e)))
        },
        n.prototype.paste = function(t) {
            var e, n;
            if (null != (null != t && null != (n = t.clipboardData) ? n.items: void 0)) return this.emit("paste", t),
            e = t.clipboardData.items,
            e.length ? this._addFilesFromItems(e) : void 0
        },
        n.prototype.handleFiles = function(t) {
            var e, n, i, r;
            for (r = [], n = 0, i = t.length; i > n; n++) e = t[n],
            r.push(this.addFile(e));
            return r
        },
        n.prototype._addFilesFromItems = function(t) {
            var e, n, i, r, o;
            for (o = [], i = 0, r = t.length; r > i; i++) n = t[i],
            null != n.webkitGetAsEntry && (e = n.webkitGetAsEntry()) ? e.isFile ? o.push(this.addFile(n.getAsFile())) : e.isDirectory ? o.push(this._addFilesFromDirectory(e, e.name)) : o.push(void 0) : null != n.getAsFile && (null == n.kind || "file" === n.kind) ? o.push(this.addFile(n.getAsFile())) : o.push(void 0);
            return o
        },
        n.prototype._addFilesFromDirectory = function(t, e) {
            var n, i;
            return n = t.createReader(),
            i = function(t) {
                return function(n) {
                    var i, r, o;
                    for (r = 0, o = n.length; o > r; r++) i = n[r],
                    i.isFile ? i.file(function(n) {
                        return t.options.ignoreHiddenFiles && "." === n.name.substring(0, 1) ? void 0 : (n.fullPath = "" + e + "/" + n.name, t.addFile(n))
                    }) : i.isDirectory && t._addFilesFromDirectory(i, "" + e + "/" + i.name)
                }
            } (this),
            n.readEntries(i,
            function(t) {
                return "undefined" != typeof console && null !== console && "function" == typeof console.log ? console.log(t) : void 0
            })
        },
        n.prototype.accept = function(t, e) {
            return t.size > 1024 * this.options.maxFilesize * 1024 ? e(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(t.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize)) : n.isValidFile(t, this.options.acceptedFiles) ? null != this.options.maxFiles && this.getAcceptedFiles().length >= this.options.maxFiles ? (e(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles)), this.emit("maxfilesexceeded", t)) : this.options.accept.call(this, t, e) : e(this.options.dictInvalidFileType)
        },
        n.prototype.addFile = function(t) {
            return t.upload = {
                progress: 0,
                total: t.size,
                bytesSent: 0
            },
            this.files.push(t),
            t.status = n.ADDED,
            this.emit("addedfile", t),
            this._enqueueThumbnail(t),
            this.accept(t,
            function(e) {
                return function(n) {
                    return n ? (t.accepted = !1, e._errorProcessing([t], n)) : (t.accepted = !0, e.options.autoQueue && e.enqueueFile(t)),
                    e._updateMaxFilesReachedClass()
                }
            } (this))
        },
        n.prototype.enqueueFiles = function(t) {
            var e, n, i;
            for (n = 0, i = t.length; i > n; n++) e = t[n],
            this.enqueueFile(e);
            return null
        },
        n.prototype.enqueueFile = function(t) {
            if (t.status !== n.ADDED || t.accepted !== !0) throw new Error("This file can't be queued because it has already been processed or was rejected.");
            return t.status = n.QUEUED,
            this.options.autoProcessQueue ? setTimeout(function(t) {
                return function() {
                    return t.processQueue()
                }
            } (this), 0) : void 0
        },
        n.prototype._thumbnailQueue = [],
        n.prototype._processingThumbnail = !1,
        n.prototype._enqueueThumbnail = function(t) {
            return this.options.createImageThumbnails && t.type.match(/image.*/) && t.size <= 1024 * this.options.maxThumbnailFilesize * 1024 ? (this._thumbnailQueue.push(t), setTimeout(function(t) {
                return function() {
                    return t._processThumbnailQueue()
                }
            } (this), 0)) : void 0
        },
        n.prototype._processThumbnailQueue = function() {
            return this._processingThumbnail || 0 === this._thumbnailQueue.length ? void 0 : (this._processingThumbnail = !0, this.createThumbnail(this._thumbnailQueue.shift(),
            function(t) {
                return function() {
                    return t._processingThumbnail = !1,
                    t._processThumbnailQueue()
                }
            } (this)))
        },
        n.prototype.removeFile = function(t) {
            return t.status === n.UPLOADING && this.cancelUpload(t),
            this.files = a(this.files, t),
            this.emit("removedfile", t),
            0 === this.files.length ? this.emit("reset") : void 0
        },
        n.prototype.removeAllFiles = function(t) {
            var e, i, r, o;
            for (null == t && (t = !1), o = this.files.slice(), i = 0, r = o.length; r > i; i++) e = o[i],
            (e.status !== n.UPLOADING || t) && this.removeFile(e);
            return null
        },
        n.prototype.createThumbnail = function(t, e) {
            var n;
            return n = new FileReader,
            n.onload = function(i) {
                return function() {
                    return "image/svg+xml" === t.type ? (i.emit("thumbnail", t, n.result), void(null != e && e())) : i.createThumbnailFromUrl(t, n.result, e)
                }
            } (this),
            n.readAsDataURL(t)
        },
        n.prototype.createThumbnailFromUrl = function(t, e, n, i) {
            var r;
            return r = document.createElement("img"),
            i && (r.crossOrigin = i),
            r.onload = function(e) {
                return function() {
                    var i, s, a, l, u, c, d, h;
                    return t.width = r.width,
                    t.height = r.height,
                    a = e.options.resize.call(e, t),
                    null == a.trgWidth && (a.trgWidth = a.optWidth),
                    null == a.trgHeight && (a.trgHeight = a.optHeight),
                    i = document.createElement("canvas"),
                    s = i.getContext("2d"),
                    i.width = a.trgWidth,
                    i.height = a.trgHeight,
                    o(s, r, null != (u = a.srcX) ? u: 0, null != (c = a.srcY) ? c: 0, a.srcWidth, a.srcHeight, null != (d = a.trgX) ? d: 0, null != (h = a.trgY) ? h: 0, a.trgWidth, a.trgHeight),
                    l = i.toDataURL("image/png"),
                    e.emit("thumbnail", t, l),
                    null != n ? n() : void 0
                }
            } (this),
            null != n && (r.onerror = n),
            r.src = e
        },
        n.prototype.processQueue = function() {
            var t, e, n, i;
            if (e = this.options.parallelUploads, n = this.getUploadingFiles().length, t = n, !(n >= e) && (i = this.getQueuedFiles(), i.length > 0)) {
                if (this.options.uploadMultiple) return this.processFiles(i.slice(0, e - n));
                for (; e > t;) {
                    if (!i.length) return;
                    this.processFile(i.shift()),
                    t++
                }
            }
        },
        n.prototype.processFile = function(t) {
            return this.processFiles([t])
        },
        n.prototype.processFiles = function(t) {
            var e, i, r;
            for (i = 0, r = t.length; r > i; i++) e = t[i],
            e.processing = !0,
            e.status = n.UPLOADING,
            this.emit("processing", e);
            return this.options.uploadMultiple && this.emit("processingmultiple", t),
            this.uploadFiles(t)
        },
        n.prototype._getFilesWithXhr = function(t) {
            var e, n;
            return n = function() {
                var n, i, r, o;
                for (r = this.files, o = [], n = 0, i = r.length; i > n; n++) e = r[n],
                e.xhr === t && o.push(e);
                return o
            }.call(this)
        },
        n.prototype.cancelUpload = function(t) {
            var e, i, r, o, s, a, l;
            if (t.status === n.UPLOADING) {
                for (i = this._getFilesWithXhr(t.xhr), r = 0, s = i.length; s > r; r++) e = i[r],
                e.status = n.CANCELED;
                for (t.xhr.abort(), o = 0, a = i.length; a > o; o++) e = i[o],
                this.emit("canceled", e);
                this.options.uploadMultiple && this.emit("canceledmultiple", i)
            } else((l = t.status) === n.ADDED || l === n.QUEUED) && (t.status = n.CANCELED, this.emit("canceled", t), this.options.uploadMultiple && this.emit("canceledmultiple", [t]));
            return this.options.autoProcessQueue ? this.processQueue() : void 0
        },
        r = function() {
            var t, e;
            return e = arguments[0],
            t = 2 <= arguments.length ? l.call(arguments, 1) : [],
            "function" == typeof e ? e.apply(this, t) : e
        },
        n.prototype.uploadFile = function(t) {
            return this.uploadFiles([t])
        },
        n.prototype.uploadFiles = function(t) {
            var e, o, s, a, l, u, c, d, h, p, f, m, g, v, y, b, w, x, k, T, E, C, $, _, S, A, N, D, F, L, j, I, O, R;
            for (k = new XMLHttpRequest, T = 0, _ = t.length; _ > T; T++) e = t[T],
            e.xhr = k;
            m = r(this.options.method, t),
            w = r(this.options.url, t),
            k.open(m, w, !0),
            k.withCredentials = !!this.options.withCredentials,
            y = null,
            s = function(n) {
                return function() {
                    var i, r, o;
                    for (o = [], i = 0, r = t.length; r > i; i++) e = t[i],
                    o.push(n._errorProcessing(t, y || n.options.dictResponseError.replace("{{statusCode}}", k.status), k));
                    return o
                }
            } (this),
            b = function(n) {
                return function(i) {
                    var r, o, s, a, l, u, c, d, h;
                    if (null != i) for (o = 100 * i.loaded / i.total, s = 0, u = t.length; u > s; s++) e = t[s],
                    e.upload = {
                        progress: o,
                        total: i.total,
                        bytesSent: i.loaded
                    };
                    else {
                        for (r = !0, o = 100, a = 0, c = t.length; c > a; a++) e = t[a],
                        (100 !== e.upload.progress || e.upload.bytesSent !== e.upload.total) && (r = !1),
                        e.upload.progress = o,
                        e.upload.bytesSent = e.upload.total;
                        if (r) return
                    }
                    for (h = [], l = 0, d = t.length; d > l; l++) e = t[l],
                    h.push(n.emit("uploadprogress", e, o, e.upload.bytesSent));
                    return h
                }
            } (this),
            k.onload = function(e) {
                return function(i) {
                    var r;
                    if (t[0].status !== n.CANCELED && 4 === k.readyState) {
                        if (y = k.responseText, k.getResponseHeader("content-type") && ~k.getResponseHeader("content-type").indexOf("application/json")) try {
                            y = JSON.parse(y)
                        } catch(o) {
                            i = o,
                            y = "Invalid JSON response from server."
                        }
                        return b(),
                        200 <= (r = k.status) && 300 > r ? e._finished(t, y, i) : s()
                    }
                }
            } (this),
            k.onerror = function(e) {
                return function() {
                    return t[0].status !== n.CANCELED ? s() : void 0
                }
            } (this),
            v = null != (F = k.upload) ? F: k,
            v.onprogress = b,
            u = {
                Accept: "application/json",
                "Cache-Control": "no-cache",
                "X-Requested-With": "XMLHttpRequest"
            },
            this.options.headers && i(u, this.options.headers);
            for (a in u) l = u[a],
            l && k.setRequestHeader(a, l);
            if (o = new FormData, this.options.params) {
                L = this.options.params;
                for (f in L) x = L[f],
                o.append(f, x)
            }
            for (E = 0, S = t.length; S > E; E++) e = t[E],
            this.emit("sending", e, k, o);
            if (this.options.uploadMultiple && this.emit("sendingmultiple", t, k, o), "FORM" === this.element.tagName) for (j = this.element.querySelectorAll("input, textarea, select, button"), C = 0, A = j.length; A > C; C++) if (d = j[C], h = d.getAttribute("name"), p = d.getAttribute("type"), "SELECT" === d.tagName && d.hasAttribute("multiple")) for (I = d.options, $ = 0, N = I.length; N > $; $++) g = I[$],
            g.selected && o.append(h, g.value);
            else(!p || "checkbox" !== (O = p.toLowerCase()) && "radio" !== O || d.checked) && o.append(h, d.value);
            for (c = D = 0, R = t.length - 1; R >= 0 ? R >= D: D >= R; c = R >= 0 ? ++D: --D) o.append(this._getParamName(c), t[c], t[c].name);
            return this.submitRequest(k, o, t)
        },
        n.prototype.submitRequest = function(t, e, n) {
            return t.send(e)
        },
        n.prototype._finished = function(t, e, i) {
            var r, o, s;
            for (o = 0, s = t.length; s > o; o++) r = t[o],
            r.status = n.SUCCESS,
            this.emit("success", r, e, i),
            this.emit("complete", r);
            return this.options.uploadMultiple && (this.emit("successmultiple", t, e, i), this.emit("completemultiple", t)),
            this.options.autoProcessQueue ? this.processQueue() : void 0
        },
        n.prototype._errorProcessing = function(t, e, i) {
            var r, o, s;
            for (o = 0, s = t.length; s > o; o++) r = t[o],
            r.status = n.ERROR,
            this.emit("error", r, e, i),
            this.emit("complete", r);
            return this.options.uploadMultiple && (this.emit("errormultiple", t, e, i), this.emit("completemultiple", t)),
            this.options.autoProcessQueue ? this.processQueue() : void 0
        },
        n
    } (e),
    t.version = "4.2.0",
    t.options = {},
    t.optionsForElement = function(e) {
        return e.getAttribute("id") ? t.options[n(e.getAttribute("id"))] : void 0
    },
    t.instances = [],
    t.forElement = function(t) {
        if ("string" == typeof t && (t = document.querySelector(t)), null == (null != t ? t.dropzone: void 0)) throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");
        return t.dropzone
    },
    t.autoDiscover = !0,
    t.discover = function() {
        var e, n, i, r, o, s;
        for (document.querySelectorAll ? i = document.querySelectorAll(".dropzone") : (i = [], e = function(t) {
            var e, n, r, o;
            for (o = [], n = 0, r = t.length; r > n; n++) e = t[n],
            /(^| )dropzone($| )/.test(e.className) ? o.push(i.push(e)) : o.push(void 0);
            return o
        },
        e(document.getElementsByTagName("div")), e(document.getElementsByTagName("form"))), s = [], r = 0, o = i.length; o > r; r++) n = i[r],
        t.optionsForElement(n) !== !1 ? s.push(new t(n)) : s.push(void 0);
        return s
    },
    t.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i],
    t.isBrowserSupported = function() {
        var e, n, i, r, o;
        if (e = !0, window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) if ("classList" in document.createElement("a")) for (o = t.blacklistedBrowsers, i = 0, r = o.length; r > i; i++) n = o[i],
        n.test(navigator.userAgent) && (e = !1);
        else e = !1;
        else e = !1;
        return e
    },
    a = function(t, e) {
        var n, i, r, o;
        for (o = [], i = 0, r = t.length; r > i; i++) n = t[i],
        n !== e && o.push(n);
        return o
    },
    n = function(t) {
        return t.replace(/[\-_](\w)/g,
        function(t) {
            return t.charAt(1).toUpperCase()
        })
    },
    t.createElement = function(t) {
        var e;
        return e = document.createElement("div"),
        e.innerHTML = t,
        e.childNodes[0]
    },
    t.elementInside = function(t, e) {
        if (t === e) return ! 0;
        for (; t = t.parentNode;) if (t === e) return ! 0;
        return ! 1
    },
    t.getElement = function(t, e) {
        var n;
        if ("string" == typeof t ? n = document.querySelector(t) : null != t.nodeType && (n = t), null == n) throw new Error("Invalid `" + e + "` option provided. Please provide a CSS selector or a plain HTML element.");
        return n
    },
    t.getElements = function(t, e) {
        var n, i, r, o, s, a, l, u;
        if (t instanceof Array) {
            r = [];
            try {
                for (o = 0, a = t.length; a > o; o++) i = t[o],
                r.push(this.getElement(i, e))
            } catch(c) {
                n = c,
                r = null
            }
        } else if ("string" == typeof t) for (r = [], u = document.querySelectorAll(t), s = 0, l = u.length; l > s; s++) i = u[s],
        r.push(i);
        else null != t.nodeType && (r = [t]);
        if (null == r || !r.length) throw new Error("Invalid `" + e + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");
        return r
    },
    t.confirm = function(t, e, n) {
        return window.confirm(t) ? e() : null != n ? n() : void 0
    },
    t.isValidFile = function(t, e) {
        var n, i, r, o, s;
        if (!e) return ! 0;
        for (e = e.split(","), i = t.type, n = i.replace(/\/.*$/, ""), o = 0, s = e.length; s > o; o++) if (r = e[o], r = r.trim(), "." === r.charAt(0)) {
            if ( - 1 !== t.name.toLowerCase().indexOf(r.toLowerCase(), t.name.length - r.length)) return ! 0
        } else if (/\/\*$/.test(r)) {
            if (n === r.replace(/\/.*$/, "")) return ! 0
        } else if (i === r) return ! 0;
        return ! 1
    },
    "undefined" != typeof jQuery && null !== jQuery && (jQuery.fn.dropzone = function(e) {
        return this.each(function() {
            return new t(this, e)
        })
    }),
    "undefined" != typeof module && null !== module ? module.exports = t: window.Dropzone = t,
    t.ADDED = "added",
    t.QUEUED = "queued",
    t.ACCEPTED = t.QUEUED,
    t.UPLOADING = "uploading",
    t.PROCESSING = t.UPLOADING,
    t.CANCELED = "canceled",
    t.ERROR = "error",
    t.SUCCESS = "success",
    r = function(t) {
        var e, n, i, r, o, s, a, l, u, c;
        for (a = t.naturalWidth, s = t.naturalHeight, n = document.createElement("canvas"), n.width = 1, n.height = s, i = n.getContext("2d"), i.drawImage(t, 0, 0), r = i.getImageData(0, 0, 1, s).data, c = 0, o = s, l = s; l > c;) e = r[4 * (l - 1) + 3],
        0 === e ? o = l: c = l,
        l = o + c >> 1;
        return u = l / s,
        0 === u ? 1 : u
    },
    o = function(t, e, n, i, o, s, a, l, u, c) {
        var d;
        return d = r(e),
        t.drawImage(e, n, i, o, s, a, l, u, c / d)
    },
    i = function(t, e) {
        var n, i, r, o, s, a, l, u, c;
        if (r = !1, c = !0, i = t.document, u = i.documentElement, n = i.addEventListener ? "addEventListener": "attachEvent", l = i.addEventListener ? "removeEventListener": "detachEvent", a = i.addEventListener ? "": "on", o = function(n) {
            return "readystatechange" !== n.type || "complete" === i.readyState ? (("load" === n.type ? t: i)[l](a + n.type, o, !1), !r && (r = !0) ? e.call(t, n.type || n) : void 0) : void 0
        },
        s = function() {
            var t;
            try {
                u.doScroll("left")
            } catch(e) {
                return t = e,
                void setTimeout(s, 50)
            }
            return o("poll")
        },
        "complete" !== i.readyState) {
            if (i.createEventObject && u.doScroll) {
                try {
                    c = !t.frameElement
                } catch(d) {}
                c && s()
            }
            return i[n](a + "DOMContentLoaded", o, !1),
            i[n](a + "readystatechange", o, !1),
            t[n](a + "load", o, !1)
        }
    },
    t._autoDiscoverFunction = function() {
        return t.autoDiscover ? t.discover() : void 0
    },
    i(window, t._autoDiscoverFunction)
}.call(this),
!
function(t, e) {
    var n = function(t, e, n) {
        var i;
        return function() {
            function r() {
                n || t.apply(o, s),
                i = null
            }
            var o = this,
            s = arguments;
            i ? clearTimeout(i) : n && t.apply(o, s),
            i = setTimeout(r, e || 100)
        }
    };
    jQuery.fn[e] = function(t) {
        return t ? this.bind("resize", n(t)) : this.trigger(e)
    }
} (jQuery, "smartresize"),
!
function(t) {
    t.fn.fluidbox = function(e) {
        var n = t.extend(!0, {
            viewportFill: .95,
            overlayColor: "rgba(255,255,255,.85)",
            debounceResize: !0,
            stackIndex: 1e3,
            stackIndexDelta: 10,
            closeTrigger: [{
                selector: ".fluidbox-overlay",
                event: "click"
            },
            {
                selector: "document",
                event: "keyup",
                keyCode: 27
            }]
        },
        e);
        n.stackIndex < n.stackIndexDelta && (n.stackIndexDelta = n.stackIndex),
        $fbOverlay = t("<div />", {
            "class": "fluidbox-overlay",
            css: {
                "background-color": n.overlayColor,
                "z-index": n.stackIndex
            }
        });
        var i, r = this,
        o = t(window),
        s = function() {
            t(".fluidbox-opened").trigger("click")
        },
        a = function(t) {
            var e = t.find("img"),
            n = t.find(".fluidbox-ghost"),
            i = t.find(".fluidbox-wrap"),
            r = o.scrollTop() - e.offset().top + .5 * e.data("imgHeight") * (e.data("imgScale") - 1) + .5 * (o.height() - e.data("imgHeight") * e.data("imgScale")),
            s = .5 * e.data("imgWidth") * (e.data("imgScale") - 1) + .5 * (o.width() - e.data("imgWidth") * e.data("imgScale")) - e.offset().left,
            a = e.data("imgScale");
            n.css({
                transform: "translate(" + parseInt(10 * s) / 10 + "px," + parseInt(10 * r) / 10 + "px) scale(" + parseInt(1e3 * a) / 1e3 + ")",
                top: e.offset().top - i.offset().top,
                left: e.offset().left - i.offset().left
            })
        },
        l = function() {
            r.each(function() {
                u(t(this))
            })
        },
        u = function(t) {
            function e() {
                l.imgWidth = r.width(),
                l.imgHeight = r.height(),
                l.imgRatio = r.width() / r.height(),
                s.css({
                    width: r.width(),
                    height: r.height(),
                    top: r.offset().top - a.offset().top + parseInt(r.css("borderTopWidth")) + parseInt(r.css("paddingTop")),
                    left: r.offset().left - a.offset().left + parseInt(r.css("borderLeftWidth")) + parseInt(r.css("paddingLeft"))
                }),
                l.imgScale = i > l.imgRatio ? o.height() * n.viewportFill / r.height() : o.width() * n.viewportFill / r.width()
            }
            if (i = o.width() / o.height(), t.hasClass("fluidbox")) {
                var r = t.find("img"),
                s = t.find(".fluidbox-ghost"),
                a = t.find(".fluidbox-wrap"),
                l = r.data();
                e(),
                r.load(e)
            }
        },
        c = function(e) {
            if (t(this).hasClass("fluidbox")) {
                var i = t(this),
                r = t(this).find("img"),
                o = t(this).find(".fluidbox-ghost"),
                s = t(this).find(".fluidbox-wrap"),
                l = {};
                0 !== t(this).data("fluidbox-state") && t(this).data("fluidbox-state") ? (i.data("fluidbox-state", 0).removeClass("fluidbox-opened").addClass("fluidbox-closed"), l.open && window.clearTimeout(l.open), l.close = window.setTimeout(function() {
                    t(".fluidbox-overlay").remove(),
                    s.css({
                        "z-index": n.stackIndex - n.stackIndexDelta
                    })
                },
                10), t(".fluidbox-overlay").css({
                    opacity: 0
                }), o.css({
                    transform: "translate(0,0) scale(1)",
                    opacity: 0,
                    top: r.offset().top - s.offset().top + parseInt(r.css("borderTopWidth")) + parseInt(r.css("paddingTop")),
                    left: r.offset().left - s.offset().left + parseInt(r.css("borderLeftWidth")) + parseInt(r.css("paddingLeft"))
                }), r.css({
                    opacity: 1
                })) : t("<img />", {
                    src: r.attr("src")
                }).load(function() {
                    i.append($fbOverlay).data("fluidbox-state", 1).removeClass("fluidbox-closed").addClass("fluidbox-opened"),
                    l.close && window.clearTimeout(l.close),
                    l.open = window.setTimeout(function() {
                        t(".fluidbox-overlay").css({
                            opacity: 1
                        })
                    },
                    10),
                    t(".fluidbox-wrap").css({
                        zIndex: n.stackIndex - n.stackIndexDelta - 1
                    }),
                    s.css({
                        "z-index": n.stackIndex + n.stackIndexDelta
                    }),
                    o.css({
                        "background-image": "url(" + r.attr("src") + ")",
                        opacity: 1
                    }),
                    r.css({
                        opacity: 0
                    }),
                    t("<img />", {
                        src: i.attr("href")
                    }).load(function() {
                        o.css({
                            "background-image": "url(" + i.attr("href") + ")"
                        })
                    }),
                    a(i)
                }),
                e.preventDefault()
            }
        };
        n.closeTrigger && t.each(n.closeTrigger,
        function(e) {
            var i = n.closeTrigger[e];
            "window" != i.selector ? "document" == i.selector ? i.keyCode ? t(document).on(i.event,
            function(t) {
                t.keyCode == i.keyCode && s()
            }) : t(document).on(i.event, s) : t(document).on(i.event, n.closeTrigger[e].selector, s) : o.on(i.event, s)
        }),
        r.each(function() {
            if (t(this).is("a") && 1 === t(this).children().length && t(this).children().is("img")) {
                var e = t("<div />", {
                    "class": "fluidbox-wrap",
                    css: {
                        "z-index": n.stackIndex - n.stackIndexDelta
                    }
                }),
                i = t(this);
                i.addClass("fluidbox").wrapInner(e).find("img").css({
                    opacity: 1
                }).after('<div class="fluidbox-ghost" />').each(function() {
                    var e = t(this);
                    e.width() > 0 && e.height() > 0 ? (u(i), i.click(c)) : e.load(function() {
                        u(i),
                        i.click(c)
                    })
                })
            }
        });
        var d = function() {
            l();
            var e = t("a.fluidbox.fluidbox-opened");
            e.length > 0 && a(e)
        };
        return n.debounceResize ? t(window).smartresize(d) : t(window).resize(d),
        r
    }
} (jQuery),
function() {
    window.SocialShareButton = {
        openUrl: function(t) {
            return window.open(t),
            !1
        },
        share: function(t) {
            var e, n, i, r, o, s;
            switch (i = $(t).data("site"), r = encodeURIComponent($(t).parent().data("title") || ""), n = encodeURIComponent($(t).parent().data("img") || ""), s = encodeURIComponent($(t).parent().data("url") || ""), 0 === s.length && (s = encodeURIComponent(location.href)), i) {
            case "email":
                location.href = "mailto:?to=&subject=" + r + "&body=" + s;
                break;
            case "weibo":
                SocialShareButton.openUrl("http://service.weibo.com/share/share.php?url=" + s + "&type=3&pic=" + n + "&title=" + r);
                break;
            case "twitter":
                SocialShareButton.openUrl("https://twitter.com/home?status=" + r + ": " + s);
                break;
            case "douban":
                SocialShareButton.openUrl("http://shuo.douban.com/!service/share?href=" + s + "&name=" + r + "&image=" + n);
                break;
            case "facebook":
                SocialShareButton.openUrl("http://www.facebook.com/sharer.php?t=" + r + "&u=" + s);
                break;
            case "qq":
                SocialShareButton.openUrl("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=" + s + "&title=" + r + "&pics=" + n);
                break;
            case "tqq":
                SocialShareButton.openUrl("http://share.v.t.qq.com/index.php?c=share&a=index&url=" + s + "&title=" + r + "&pic=" + n);
                break;
            case "baidu":
                SocialShareButton.openUrl("http://hi.baidu.com/pub/show/share?url=" + s + "&title=" + r + "&content=");
                break;
            case "kaixin001":
                SocialShareButton.openUrl("http://www.kaixin001.com/rest/records.php?url=" + s + "&content=" + r + "&style=11&pic=" + n);
                break;
            case "renren":
                SocialShareButton.openUrl("http://widget.renren.com/dialog/share?resourceUrl=" + s + "&srcUrl=" + s + "&title=" + r + "&pic=" + n + "&description=");
                break;
            case "google_plus":
                SocialShareButton.openUrl("https://plus.google.com/share?url=" + s + "&t=" + r);
                break;
            case "google_bookmark":
                SocialShareButton.openUrl("https://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=" + s + "&title=" + r);
                break;
            case "delicious":
                SocialShareButton.openUrl("http://www.delicious.com/save?url=" + s + "&title=" + r + "&jump=yes&pic=" + n);
                break;
            case "plurk":
                SocialShareButton.openUrl("http://www.plurk.com/?status=" + r + ": " + s + "&qualifier=shares");
                break;
            case "tumblr":
                e = function(e) {
                    var n;
                    return n = $(t).attr("data-" + e),
                    n ? encodeURIComponent(n) : void 0
                },
                o = function() {
                    var t, i, o, a;
                    return i = e("type") || "link",
                    t = function() {
                        switch (i) {
                        case "text":
                            return r = e("title") || r,
                            "title=" + r;
                        case "photo":
                            return r = e("caption") || r,
                            a = e("source") || n,
                            "caption=" + r + "&source=" + a;
                        case "quote":
                            return o = e("quote") || r,
                            a = e("source") || "",
                            "quote=" + o + "&source=" + a;
                        default:
                            return r = e("title") || r,
                            s = e("url") || s,
                            "name=" + r + "&url=" + s
                        }
                    } (),
                    "/" + i + "?" + t
                },
                SocialShareButton.openUrl("http://www.tumblr.com/share" + o())
            }
            return ! 1
        }
    }
}.call(this),
/*
  Implement GitHub like autocomplete mentions
  http://ichord.github.com/At.js

  Copyright (c) 2013 chord.luo@gmail.com
  Licensed under the MIT license.
*/
function() { !
    function(t) {
        return "function" == typeof define && define.amd ? define(["jquery"], t) : t(window.jQuery)
    } (function(t) {
        "use strict";
        var e, n, i, r;
        return r = "caret",
        e = function() {
            function e(t) {
                this.$inputor = t,
                this.domInputor = this.$inputor[0]
            }
            return e.prototype.getPos = function() {
                var t, e, n, i, r, o, s, a, l;
                return n = this.domInputor,
                n.focus(),
                document.selection ? (s = document.selection.createRange(), o = 0, s && s.parentElement() === n && (r = n.value.replace(/\r\n/g, "\n"), i = r.length, l = n.createTextRange(), l.moveToBookmark(s.getBookmark()), e = n.createTextRange(), e.collapse(!1), l.compareEndPoints("StartToEnd", e) > -1 ? a = t = i: (a = -l.moveStart("character", -i), t = -l.moveEnd("character", -i)))) : a = n.selectionStart,
                a
            },
            e.prototype.setPos = function(t) {
                var e, n;
                return e = this.domInputor,
                document.selection ? (n = e.createTextRange(), n.move("character", t), n.select()) : e.setSelectionRange(t, t)
            },
            e.prototype.getPosition = function(t) {
                var e, i, r, o, s, a, l, u, c;
                return e = this.$inputor,
                r = function(t) {
                    return t.replace(/</g, "&lt").replace(/>/g, "&gt").replace(/`/g, "&#96").replace(/"/g, "&quot").replace(/\r\n|\r|\n/g, "<br />")
                },
                void 0 === t && (t = this.getPos()),
                l = e.val().slice(0, t),
                s = "<span>" + r(l) + "</span>",
                s += "<span id='caret'>|</span>",
                a = new n(e),
                i = a.create(s).rect(),
                u = i.left - e.scrollLeft(),
                c = i.top - e.scrollTop(),
                o = i.height,
                {
                    left: u,
                    top: c,
                    height: o
                }
            },
            e.prototype.getOffset = function(t) {
                var e, n, i, r, o, s;
                return e = this.$inputor,
                i = e.offset(),
                r = this.getPosition(t),
                o = i.left + r.left,
                s = i.top + r.top,
                n = r.height,
                {
                    left: o,
                    top: s,
                    height: n
                }
            },
            e.prototype.getIEPosition = function(t) {
                var e, n, i, r, o;
                return i = this.getIEOffset(t),
                n = this.$inputor.offset(),
                r = i.left - n.left,
                o = i.top - n.top,
                e = i.height,
                {
                    left: r,
                    top: o,
                    height: e
                }
            },
            e.prototype.getIEOffset = function(e) {
                var n, i, r, o;
                return i = this.domInputor.createTextRange(),
                e && i.move("character", e),
                r = i.boundingLeft + $inputor.scrollLeft(),
                o = i.boundingTop + t(window).scrollTop() + $inputor.scrollTop(),
                n = i.boundingHeight,
                {
                    left: r,
                    top: o,
                    height: n
                }
            },
            e
        } (),
        n = function() {
            function e(t) {
                this.$inputor = t
            }
            return e.prototype.css_attr = ["overflowY", "height", "width", "paddingTop", "paddingLeft", "paddingRight", "paddingBottom", "marginTop", "marginLeft", "marginRight", "marginBottom", "fontFamily", "borderStyle", "borderWidth", "wordWrap", "fontSize", "lineHeight", "overflowX", "text-align"],
            e.prototype.mirrorCss = function() {
                var e, n = this;
                return e = {
                    position: "absolute",
                    left: -9999,
                    top: 0,
                    zIndex: -2e4,
                    "white-space": "pre-wrap"
                },
                t.each(this.css_attr,
                function(t, i) {
                    return e[i] = n.$inputor.css(i)
                }),
                e
            },
            e.prototype.create = function(e) {
                return this.$mirror = t("<div></div>"),
                this.$mirror.css(this.mirrorCss()),
                this.$mirror.html(e),
                this.$inputor.after(this.$mirror),
                this
            },
            e.prototype.rect = function() {
                var t, e, n;
                return t = this.$mirror.find("#caret"),
                e = t.position(),
                n = {
                    left: e.left,
                    top: e.top,
                    height: t.height()
                },
                this.$mirror.remove(),
                n
            },
            e
        } (),
        i = {
            pos: function(t) {
                return t ? this.setPos(t) : this.getPos()
            },
            position: function(t) {
                return document.selection ? this.getIEPosition(t) : this.getPosition(t)
            },
            offset: function(t) {
                return document.selection ? this.getIEOffset(t) : this.getOffset(t)
            }
        },
        t.fn.caret = function(n) {
            var r;
            return r = new e(this),
            i[n] ? i[n].apply(r, Array.prototype.slice.call(arguments, 1)) : t.error("Method " + n + " does not exist on jQuery.caret")
        }
    })
}.call(this),
/*
  Implement GitHub like autocomplete mentions
  http://ichord.github.com/At.js

  Copyright (c) 2013 chord.luo@gmail.com
  Licensed under the MIT license.
*/
function() {
    var t = [].slice; !
    function(t) {
        return "function" == typeof define && define.amd ? define(["jquery"], t) : t(window.jQuery)
    } (function(e) {
        var n, i, r, o, s, a, l, u, c;
        return r = function() {
            function t(t) {
                this.current_flag = null,
                this.controllers = {},
                this.$inputor = e(t),
                this.listen()
            }
            return t.prototype.controller = function(t) {
                return this.controllers[t || this.current_flag]
            },
            t.prototype.set_context_for = function(t) {
                return this.current_flag = t,
                this
            },
            t.prototype.reg = function(t, e) {
                var n, i;
                return n = (i = this.controllers)[t] || (i[t] = new o(this, t)),
                e.alias && (this.controllers[e.alias] = n),
                n.init(e),
                this
            },
            t.prototype.listen = function() {
                var t = this;
                return this.$inputor.on("keyup.atwho",
                function(e) {
                    return t.on_keyup(e)
                }).on("keydown.atwho",
                function(e) {
                    return t.on_keydown(e)
                }).on("scroll.atwho",
                function(e) {
                    var n;
                    return null != (n = t.controller()) ? n.view.hide() : void 0
                }).on("blur.atwho",
                function(e) {
                    var n;
                    return (n = t.controller()) ? n.view.hide(n.get_opt("display_timeout")) : void 0
                })
            },
            t.prototype.dispatch = function() {
                var t = this;
                return e.map(this.controllers,
                function(e) {
                    return e.look_up() ? t.set_context_for(e.key) : void 0
                })
            },
            t.prototype.on_keyup = function(t) {
                var n;
                switch (t.keyCode) {
                case l.ESC:
                    t.preventDefault(),
                    null != (n = this.controller()) && n.view.hide();
                    break;
                case l.DOWN:
                case l.UP:
                    e.noop();
                    break;
                default:
                    this.dispatch()
                }
            },
            t.prototype.on_keydown = function(t) {
                var n, i;
                if (n = null != (i = this.controller()) ? i.view: void 0, n && n.visible()) switch (t.keyCode) {
                case l.ESC:
                    t.preventDefault(),
                    n.hide();
                    break;
                case l.UP:
                    t.preventDefault(),
                    n.prev();
                    break;
                case l.DOWN:
                    t.preventDefault(),
                    n.next();
                    break;
                case l.TAB:
                case l.ENTER:
                    if (!n.visible()) return;
                    t.preventDefault(),
                    n.choose();
                    break;
                default:
                    e.noop()
                }
            },
            t
        } (),
        o = function() {
            function i(t, i) {
                this.app = t,
                this.key = i,
                this.$inputor = this.app.$inputor,
                this.id = this.$inputor[0].id || r(),
                this.setting = null,
                this.query = null,
                this.pos = 0,
                n.append(this.$el = e("<div id='atwho-ground-" + this.id + "'></div>")),
                this.model = new u(this),
                this.view = new c(this)
            }
            var r, o;
            return o = 0,
            r = function() {
                return o += 1
            },
            i.prototype.init = function(t) {
                return this.setting = e.extend({},
                this.setting || e.fn.atwho["default"], t),
                this.model.reload(this.setting.data)
            },
            i.prototype.call_default = function() {
                var n, i;
                i = arguments[0],
                n = 2 <= arguments.length ? t.call(arguments, 1) : [];
                try {
                    return s[i].apply(this, n)
                } catch(r) {
                    return e.error("" + r + " Or maybe At.js doesn't have function " + i)
                }
            },
            i.prototype.trigger = function(t, e) {
                var n, i;
                return e.push(this),
                n = this.get_opt("alias"),
                i = n ? "" + t + "-" + n + ".atwho": "" + t + ".atwho",
                this.$inputor.trigger(i, e)
            },
            i.prototype.callbacks = function(t) {
                return this.get_opt("callbacks")[t] || s[t]
            },
            i.prototype.get_opt = function(t, e) {
                try {
                    return this.setting[t]
                } catch(n) {
                    return null
                }
            },
            i.prototype.catch_query = function() {
                var t, e, n, i, r, o;
                return e = this.$inputor.val(),
                t = this.$inputor.caret("pos"),
                o = e.slice(0, t),
                i = this.callbacks("matcher").call(this, this.key, o, this.get_opt("start_with_space")),
                "string" == typeof i && i.length <= this.get_opt("max_len", 20) ? (r = t - i.length, n = r + i.length, this.pos = r, i = {
                    text: i.toLowerCase(),
                    head_pos: r,
                    end_pos: n
                },
                this.trigger("matched", [this.key, i.text])) : this.view.hide(),
                this.query = i
            },
            i.prototype.rect = function() {
                var t, e;
                return t = this.$inputor.caret("offset", this.pos - 1),
                e = document.selection ? 0 : 2,
                {
                    left: t.left,
                    top: t.top,
                    bottom: t.top + t.height + e
                }
            },
            i.prototype.insert = function(t) {
                var e, n, i, r;
                return e = this.$inputor,
                t = "" + t,
                n = e.val(),
                i = n.slice(0, this.query.head_pos || 0),
                r = "" + i + t + " " + n.slice(this.query.end_pos || 0),
                e.val(r),
                e.caret("pos", i.length + t.length + 1),
                e.change()
            },
            i.prototype.render_view = function(t) {
                var e;
                return e = this.get_opt("search_key"),
                t = this.callbacks("sorter").call(this, this.query.text, t.slice(0, 1001), e),
                this.view.render(t.slice(0, this.get_opt("limit")))
            },
            i.prototype.look_up = function() {
                var t, n;
                if (t = this.catch_query()) return n = function(t) {
                    return t && t.length > 0 ? this.render_view(t) : this.view.hide()
                },
                this.model.query(t.text, e.proxy(n, this)),
                t
            },
            i
        } (),
        u = function() {
            function t(t) {
                this.context = t,
                this.key = this.context.key
            }
            var n;
            return n = {},
            t.prototype.saved = function() {
                return this.fetch() > 0
            },
            t.prototype.query = function(t, e) {
                var n, i, r;
                return n = this.fetch(),
                i = this.context.get_opt("search_key"),
                e(n = this.context.callbacks("filter").call(this.context, t, n, i)),
                n && n.length > 0 ? void 0 : null != (r = this.context.callbacks("remote_filter")) ? r.call(this.context, t, e) : void 0
            },
            t.prototype.fetch = function() {
                return n[this.key] || []
            },
            t.prototype.save = function(t) {
                return n[this.key] = this.context.callbacks("before_save").call(this.context, t || [])
            },
            t.prototype.load = function(t) {
                return ! this.saved() && t ? this._load(t) : void 0
            },
            t.prototype.reload = function(t) {
                return this._load(t)
            },
            t.prototype._load = function(t) {
                var n = this;
                return "string" == typeof t ? e.ajax(t, {
                    dataType: "json"
                }).done(function(t) {
                    return n.save(t)
                }) : this.save(t)
            },
            t
        } (),
        c = function() {
            function t(t) {
                this.context = t,
                this.key = this.context.key,
                this.id = this.context.get_opt("alias") || "at-view-" + this.key.charCodeAt(0),
                this.$el = e("<div id='" + this.id + "' class='atwho-view'><ul id='" + this.id + "-ul' class='atwho-view-url'></ul></div>"),
                this.timeout_id = null,
                this.context.$el.append(this.$el),
                this.bind_event()
            }
            return t.prototype.bind_event = function() {
                var t, n = this;
                return t = this.$el.find("ul"),
                t.on("mouseenter.view", "li",
                function(n) {
                    return t.find(".cur").removeClass("cur"),
                    e(n.currentTarget).addClass("cur")
                }).on("click",
                function(t) {
                    return n.choose(),
                    t.preventDefault()
                })
            },
            t.prototype.visible = function() {
                return this.$el.is(":visible")
            },
            t.prototype.choose = function() {
                var t;
                return t = this.$el.find(".cur"),
                this.context.insert(this.context.callbacks("before_insert").call(this.context, t.data("value"), t)),
                this.context.trigger("inserted", [t]),
                this.hide()
            },
            t.prototype.reposition = function() {
                var t, n;
                return n = this.context.rect(),
                n.bottom + this.$el.height() - e(window).scrollTop() > e(window).height() && (n.bottom = n.top - this.$el.height()),
                t = {
                    left: n.left,
                    top: n.bottom
                },
                this.$el.offset(t),
                this.context.trigger("reposition", [t])
            },
            t.prototype.next = function() {
                var t, e;
                return t = this.$el.find(".cur").removeClass("cur"),
                e = t.next(),
                e.length || (e = this.$el.find("li:first")),
                e.addClass("cur")
            },
            t.prototype.prev = function() {
                var t, e;
                return t = this.$el.find(".cur").removeClass("cur"),
                e = t.prev(),
                e.length || (e = this.$el.find("li:last")),
                e.addClass("cur")
            },
            t.prototype.show = function() {
                return this.visible() || this.$el.show(),
                this.reposition()
            },
            t.prototype.hide = function(t) {
                var e, n = this;
                return isNaN(t && this.visible()) ? this.$el.hide() : (e = function() {
                    return n.hide()
                },
                clearTimeout(this.timeout_id), this.timeout_id = setTimeout(e, t))
            },
            t.prototype.render = function(t) {
                var n, i, r, o, s, l, u;
                if (!e.isArray(t || t.length <= 0)) return void this.hide();
                for (this.$el.find("ul").empty(), i = this.$el.find("ul"), s = this.context.get_opt("tpl", a), l = 0, u = t.length; u > l; l++) r = t[l],
                o = this.context.callbacks("tpl_eval").call(this.context, s, r),
                n = e(this.context.callbacks("highlighter").call(this.context, o, this.context.query.text)),
                n.data("atwho-info", r),
                i.append(n);
                return this.show(),
                i.find("li:first").addClass("cur")
            },
            t
        } (),
        l = {
            DOWN: 40,
            UP: 38,
            ESC: 27,
            TAB: 9,
            ENTER: 13
        },
        s = {
            before_save: function(t) {
                var n, i, r, o;
                if (!e.isArray(t)) return t;
                for (o = [], i = 0, r = t.length; r > i; i++) n = t[i],
                e.isPlainObject(n) ? o.push(n) : o.push({
                    name: n
                });
                return o
            },
            matcher: function(t, e, n) {
                var i, r;
                return t = t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"),
                n && (t = "(?:^|\\s)" + t),
                r = new RegExp(t + "([A-Za-z0-9_+-]*)$|" + t + "([^\\x00-\\xff]*)$", "gi"),
                i = r.exec(e),
                i ? i[2] || i[1] : null
            },
            filter: function(t, e, n) {
                var i, r, o, s;
                for (s = [], r = 0, o = e.length; o > r; r++) i = e[r],
                ~i[n].toLowerCase().indexOf(t) && s.push(i);
                return s
            },
            remote_filter: null,
            sorter: function(t, e, n) {
                var i, r, o, s;
                if (!t) return e;
                for (s = [], r = 0, o = e.length; o > r; r++) i = e[r],
                i.atwho_order = i[n].toLowerCase().indexOf(t),
                i.atwho_order > -1 && s.push(i);
                return s.sort(function(t, e) {
                    return t.atwho_order - e.atwho_order
                })
            },
            tpl_eval: function(t, e) {
                try {
                    return t.replace(/\$\{([^\}]*)\}/g,
                    function(t, n, i) {
                        return e[n]
                    })
                } catch(n) {
                    return ""
                }
            },
            highlighter: function(t, e) {
                var n;
                return e ? (n = new RegExp(">\\s*(\\w*)(" + e.replace("+", "\\+") + ")(\\w*)\\s*<", "ig"), t.replace(n,
                function(t, e, n, i) {
                    return "> " + e + "<strong>" + n + "</strong>" + i + " <"
                })) : t
            },
            before_insert: function(t, e) {
                return t
            }
        },
        a = "<li data-value='${name}'>${name}</li>",
        i = {
            init: function(t) {
                var n, i;
                return i = (n = e(this)).data("atwho"),
                i || n.data("atwho", i = new r(this)),
                i.reg(t.at, t)
            },
            load: function(t, e) {
                var n;
                return (n = this.controller(t)) ? n.model.load(e) : void 0
            },
            run: function() {
                return this.dispatch()
            }
        },
        n = e("<div id='atwho-container'></div>"),
        e.fn.atwho = function(t) {
            var r;
            return r = arguments,
            e("body").append(n),
            this.filter("textarea, input").each(function() {
                var n;
                return "object" != typeof t && t ? i[t] ? (n = e(this).data("atwho")) ? i[t].apply(n, Array.prototype.slice.call(r, 1)) : void 0 : e.error("Method " + t + " does not exist on jQuery.caret") : i.init.apply(this, r)
            })
        },
        e.fn.atwho["default"] = {
            at: void 0,
            alias: void 0,
            data: null,
            tpl: a,
            callbacks: s,
            search_key: "name",
            limit: 5,
            max_len: 20,
            start_with_space: !0,
            display_timeout: 300
        }
    })
}.call(this),
window.EMOJI_LIST = ["plus1", "ok_hand", "sleepy", "smile", "clap", "heart", "octopus", "six_pointed_star", "oden", "office", "ok", "ok_woman", "older_man", "skull", "smiley", "smirk", "smoking", "snake", "snowman", "sob", "soccer", "point_down", "point_left", "point_right", "point_up", "point_up_2", "a", "ab", "airplane", "alien", "ambulance", "angel", "anger", "angry", "apple", "aquarius", "aries", "arrow_backward", "arrow_down", "ski", "person_with_blond_hair", "phone", "pig", "pill", "pisces", "arrow_forward", "arrow_left", "arrow_lower_left", "arrow_lower_right", "arrow_right", "arrow_up", "arrow_upper_left", "arrow_upper_right", "art", "astonished", "atm", "b", "baby", "baby_chick", "baby_symbol", "balloon", "bamboo", "bank", "barber", "baseball", "basketball", "bath", "bear", "beer", "beers", "beginner", "bell", "bento", "bike", "bikini", "bird", "birthday", "black_square", "blue_car", "blue_heart", "blush", "boar", "boat", "bomb", "book", "boot", "bouquet", "bow", "bowtie", "boy", "bread", "briefcase", "broken_heart", "bug", "bulb", "slot_machine", "bullettrain_front", "bullettrain_side", "bus", "busstop", "cactus", "cake", "calling", "camel", "camera", "cancer", "capricorn", "car", "cat", "cd", "chart", "checkered_flag", "cherry_blossom", "chicken", "christmas_tree", "church", "cinema", "city_sunrise", "city_sunset", "clapper", "clock1", "clock10", "clock11", "clock12", "clock2", "clock3", "clock4", "clock5", "clock6", "clock7", "clock8", "clock9", "closed_umbrella", "cloud", "clubs", "cn", "cocktail", "coffee", "cold_sweat", "computer", "confounded", "congratulations", "construction", "construction_worker", "convenience_store", "cool", "cop", "copyright", "couple", "couple_with_heart", "couplekiss", "cow", "crossed_flags", "crown", "cry", "cupid", "currency_exchange", "curry", "cyclone", "dancer", "dancers", "dango", "dart", "dash", "de", "department_store", "diamonds", "disappointed", "dog", "dolls", "dolphin", "dress", "dvd", "ear", "ear_of_rice", "egg", "eggplant", "egplant", "eight_pointed_black_star", "eight_spoked_asterisk", "elephant", "email", "es", "european_castle", "exclamation", "eyes", "factory", "fallen_leaf", "fast_forward", "fax", "fearful", "feelsgood", "feet", "ferris_wheel", "finnadie", "fire", "fire_engine", "fireworks", "fish", "fist", "flags", "flushed", "football", "fork_and_knife", "fountain", "four_leaf_clover", "fr", "fries", "frog", "fuelpump", "gb", "gem", "gemini", "ghost", "gift", "gift_heart", "girl", "goberserk", "godmode", "golf", "green_heart", "grey_exclamation", "grey_question", "-1", "0", "1", "109", "2", "3", "4", "5", "6", "7", "8", "8ball", "9", "grin", "guardsman", "guitar", "gun", "haircut", "hamburger", "hammer", "hamster", "hand", "handbag", "hankey", "hash", "headphones", "heart_decoration", "heart_eyes", "heartbeat", "heartpulse", "hearts", "hibiscus", "high_heel", "horse", "hospital", "hotel", "hotsprings", "house", "hurtrealbad", "icecream", "id", "ideograph_advantage", "imp", "information_desk_person", "iphone", "it", "jack_o_lantern", "japanese_castle", "joy", "jp", "key", "kimono", "kiss", "kissing_face", "kissing_heart", "koala", "koko", "kr", "leaves", "leo", "libra", "lips", "lipstick", "lock", "loop", "loudspeaker", "love_hotel", "mag", "mahjong", "mailbox", "man", "man_with_gua_pi_mao", "man_with_turban", "maple_leaf", "mask", "massage", "mega", "memo", "mens", "metal", "metro", "microphone", "minidisc", "mobile_phone_off", "moneybag", "monkey", "monkey_face", "moon", "mortar_board", "mount_fuji", "mouse", "movie_camera", "muscle", "musical_note", "nail_care", "necktie", "new", "no_good", "no_smoking", "nose", "notes", "o", "o2", "ocean", "octocat", "older_woman", "open_hands", "ophiuchus", "palm_tree", "parking", "part_alternation_mark", "pencil", "penguin", "pensive", "persevere", "police_car", "poop", "post_office", "postbox", "pray", "princess", "punch", "purple_heart", "question", "rabbit", "racehorse", "radio", "rage", "rage1", "rage2", "rage3", "rage4", "rainbow", "raised_hands", "ramen", "red_car", "red_circle", "registered", "relaxed", "relieved", "restroom", "rewind", "ribbon", "rice", "rice_ball", "rice_cracker", "rice_scene", "ring", "rocket", "roller_coaster", "rose", "ru", "runner", "sa", "sagittarius", "sailboat", "sake", "sandal", "santa", "satellite", "satisfied", "saxophone", "school", "school_satchel", "scissors", "scorpius", "scream", "seat", "secret", "shaved_ice", "sheep", "shell", "ship", "shipit", "shirt", "shit", "shoe", "signal_strength", "space_invader", "spades", "spaghetti", "sparkler", "sparkles", "speaker", "speedboat", "squirrel", "star", "star2", "stars", "station", "statue_of_liberty", "stew", "strawberry", "sunflower", "sunny", "sunrise", "sunrise_over_mountains", "surfer", "sushi", "suspect", "sweat", "sweat_drops", "swimmer", "syringe", "tada", "tangerine", "taurus", "taxi", "tea", "telephone", "tennis", "tent", "thumbsdown", "thumbsup", "ticket", "tiger", "tm", "toilet", "tokyo_tower", "tomato", "tongue", "top", "tophat", "traffic_light", "train", "trident", "trollface", "trophy", "tropical_fish", "truck", "trumpet", "tshirt", "tulip", "tv", "u5272", "u55b6", "u6307", "u6708", "u6709", "u6e80", "u7121", "u7533", "u7a7a", "umbrella", "unamused", "underage", "unlock", "up", "us", "v", "vhs", "vibration_mode", "virgo", "vs", "walking", "warning", "watermelon", "wave", "wc", "wedding", "whale", "wheelchair", "white_square", "wind_chime", "wink", "wink2", "wolf", "woman", "womans_hat", "womens", "x", "yellow_heart", "zap", "zzz", "+1"],
function() {
    var t, e = function(t, e) {
        return function() {
            return t.apply(e, arguments)
        }
    };
    t = function() {
        function t() {
            this.checkOrRequirePermission = e(this.checkOrRequirePermission, this),
            this.setPermission = e(this.setPermission, this),
            this.enableNotification = !1,
            this.checkOrRequirePermission()
        }
        return t.prototype.hasSupport = function() {
            return null != window.webkitNotifications
        },
        t.prototype.requestPermission = function(t) {
            return window.webkitNotifications.requestPermission(t)
        },
        t.prototype.setPermission = function() {
            return this.hasPermission() ? ($("#notification-alert a.close").click(), this.enableNotification = !0) : 2 === window.webkitNotifications.checkPermission() ? $("#notification-alert a.close").click() : void 0
        },
        t.prototype.hasPermission = function() {
            return 0 === window.webkitNotifications.checkPermission() ? !0 : !1
        },
        t.prototype.checkOrRequirePermission = function() {
            return this.hasSupport() ? this.hasPermission() ? this.enableNotification = !0 : 2 !== window.webkitNotifications.checkPermission() ? this.showTooltip() : void 0 : console.log("Desktop notifications are not supported for this Browser/OS version yet.")
        },
        t.prototype.showTooltip = function() {
            return $(".breadcrumb").before("<div class='alert alert-info' id='notification-alert'><a href='#' id='link_enable_notifications' style='color:green'>\u70b9\u51fb\u8fd9\u91cc</a> \u5f00\u542f\u684c\u9762\u63d0\u9192\u901a\u77e5\u529f\u80fd\u3002 <a class='close' data-dismiss='alert' href='#'>\xd7</a></div>"),
            $("#notification-alert").alert(),
            $("#notification-alert").on("click", "a#link_enable_notifications",
            function(t) {
                return function(e) {
                    return e.preventDefault(),
                    t.requestPermission(t.setPermission)
                }
            } (this))
        },
        t.prototype.visitUrl = function(t) {
            return window.location.href = t
        },
        t.prototype.notify = function(t, e, n, i) {
            var r, o;
            return null == i && (i = null),
            this.enableNotification ? (window.Notification ? (r = {
                body: n,
                onclick: function() {
                    return window.parent.focus(),
                    $.notifier.visitUrl(i)
                }
            },
            o = new window.Notification(e, r)) : (o = window.webkitNotifications.createNotification(t, e, n), i && (o.onclick = function() {
                return window.parent.focus(),
                $.notifier.visitUrl(i)
            })), o.show()) : void 0
        },
        t
    } (),
    jQuery.notifier = new t
}.call(this),
window.MessageBus = function() {
    var t, e, n, i, r, o, s, a, l, u, c, d, h, p, f;
    s = function() {
        return "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,
        function(t) {
            var e, n;
            return e = 16 * Math.random() | 0,
            n = "x" === t ? e: 3 & e | 8,
            n.toString(16)
        })
    },
    e = s(),
    o = {},
    t = [],
    r = [],
    interval = null,
    n = 0,
    a = "/",
    p = !1,
    f = [];
    var m;
    $.each(["", "webkit", "ms", "moz", "ms"],
    function(t, e) {
        var n = e + ("" === e ? "hidden": "Hidden");
        void 0 !== document[n] && (m = n)
    });
    var g = function() {
        return void 0 !== m ? document[m] : !document.hasFocus
    };
    i = function() {
        return l.alwaysLongPoll || !g()
    };
    var v, y = 0,
    b = 0,
    w = function(e) {
        var n = !1;
        return e ? ($.each(e,
        function(e, i) {
            n = !0,
            $.each(t,
            function(t, e) {
                if (e.channel === i.channel) {
                    e.last_id = i.message_id;
                    try {
                        e.func(i.data)
                    } catch(n) {
                        console.log && console.log("MESSAGE BUS FAIL: callback " + e.channel + " caused exception " + n.message)
                    }
                }
                "/__status" === i.channel && void 0 !== i.data[e.channel] && (e.last_id = i.data[e.channel])
            })
        }), n) : !1
    };
    return d = function(t, e) {
        var r = !1,
        o = !1;
        return v = new Date,
        b += 1,
        l.ajax({
            url: l.baseUrl + "message-bus/" + l.clientId + "/poll?" + (i() && l.enableLongPolling ? "": "dlp=t"),
            data: e,
            cache: !1,
            dataType: "json",
            type: "POST",
            headers: {
                "X-SILENCE-LOGGER": "true"
            },
            success: function(t) {
                n = 0,
                p ? t && $.each(t,
                function(e, n) {
                    f.push(t)
                }) : r = w(t)
            },
            error: function(t, e, i) {
                "abort" === e ? o = !0 : (n += 1, y += 1)
            },
            complete: function() {
                var e;
                try {
                    r || o ? e = 100 : (e = l.callbackInterval, n > 2 ? e *= n: i() || (e = l.backgroundCallbackInterval), e > l.maxPollInterval && (e = l.maxPollInterval), e -= new Date - v, 100 > e && (e = 100))
                } catch(s) {
                    console.log && s.message && console.log("MESSAGE BUS FAIL: " + s.message)
                }
                h = setTimeout(function() {
                    h = null,
                    t()
                },
                e),
                l.longPoll = null
            }
        })
    },
    l = {
        enableLongPolling: !0,
        callbackInterval: 15e3,
        backgroundCallbackInterval: 6e4,
        maxPollInterval: 18e4,
        callbacks: t,
        clientId: e,
        alwaysLongPoll: !1,
        baseUrl: a,
        ajax: $.ajax,
        diagnostics: function() {
            console.log("Stopped: " + c + " Started: " + u),
            console.log("Current callbacks"),
            console.log(t),
            console.log("Total ajax calls: " + b + " Recent failure count: " + n + " Total failures: " + y),
            console.log("Last ajax call: " + (new Date - v) / 1e3 + " seconds ago")
        },
        pause: function() {
            p = !0
        },
        resume: function() {
            p = !1,
            w(f),
            f = []
        },
        stop: function() {
            c = !0,
            u = !1
        },
        start: function(e) {
            var n, i;
            u || (u = !0, c = !1, e || (e = {}), n = function() {
                var e;
                if (!c) {
                    if (0 === t.length) return void(i || (i = setTimeout(function() {
                        i = null,
                        n()
                    },
                    500)));
                    e = {},
                    $.each(t,
                    function(t, n) {
                        e[n.channel] = n.last_id
                    }),
                    l.longPoll = d(n, e)
                }
            },
            document.addEventListener && "hidden" in document && (l.visibilityEvent = document.addEventListener("visibilitychange",
            function() {
                document.hidden || l.longPoll || !h || (clearTimeout(h), h = null, n())
            })), n())
        },
        subscribe: function(e, n, i) {
            return u || c || l.start(),
            ("number" != typeof i || -1 > i) && (i = -1),
            t.push({
                channel: e,
                func: n,
                last_id: i
            }),
            l.longPoll ? l.longPoll.abort() : void 0
        },
        unsubscribe: function(e, n) {
            var i;
            return - 1 !== e.indexOf("*", e.length - 1) && (e = e.substr(0, e.length - 1), i = !0),
            t = $.grep(t,
            function(t) {
                var r;
                return r = i ? t.channel.substr(0, e.length) !== e: t.channel !== e,
                !r && n && t.func !== n && (r = !0),
                r
            }),
            l.longPoll ? l.longPoll.abort() : void 0
        }
    }
} (),
function() {
    this.FormStorage = {
        key: function(t) {
            return location.pathname + " " + $(t).prop("id")
        },
        init: function() {
            return window.localStorage ? ($(document).on("input", "textarea[name*=body]",
            function() {
                var t;
                return t = $(this),
                localStorage.setItem(FormStorage.key(t), t.val())
            }), $(document).on("submit", "form",
            function() {
                var t;
                return t = $(this),
                t.find("textarea[name*=body]").each(function() {
                    return localStorage.removeItem(FormStorage.key(this))
                })
            }), $(document).on("click", "form a.reset",
            function() {
                var t;
                return t = $(this).closest("form"),
                t.find("textarea[name*=body]").each(function() {
                    return localStorage.removeItem(FormStorage.key(this))
                })
            })) : void 0
        },
        restore: function() {
            return window.localStorage ? $("textarea[name*=body]").each(function() {
                var t, e;
                return t = $(this),
                (e = localStorage.getItem(FormStorage.key(t))) ? t.val(e) : void 0
            }) : void 0
        }
    }
}.call(this),
function() {
    window.Topics = {
        user_liked_reply_ids: []
    },
    window.TopicView = Backbone.View.extend({
        el: "body",
        currentPageImageURLs: [],
        events: {
            "click #replies .reply .btn-reply": "reply",
            "click .btn-focus-reply": "reply",
            "click #topic-upload-image": "browseUpload",
            "click .insert-codes a": "appendCodesFromHint",
            "click a.at_floor": "clickAtFloor",
            "click a.follow": "follow",
            "click a.bookmark": "bookmark",
            "click .btn-move-page": "scrollPage"
        },
        initialize: function(t) {
            return this.parentView = t.parentView,
            this.initComponents(),
            this.initDropzone(),
            this.initContentImageZoom(),
            this.initCloseWarning(),
            this.checkRepliesLikeStatus()
        },
        initDropzone: function() {
            var t, e, n, i;
            return i = this,
            e = $("textarea.topic-editor"),
            e.wrap('<div class="topic-editor-dropzone"></div>'),
            n = $(".topic-editor-dropzone"),
            n.on("paste",
            function(t) {
                return function(t) {
                    return i.handlePaste(t)
                }
            } (this)),
            t = n.dropzone({
                url: "/photos",
                dictDefaultMessage: "",
                clickable: !0,
                paramName: "file",
                maxFilesize: 20,
                uploadMultiple: !1,
                headers: {
                    "X-CSRF-Token": $('meta[name="csrf-token"]').attr("content")
                },
                previewContainer: !1,
                processing: function() {
                    return $(".div-dropzone-alert").alert("close"),
                    i.showUploading()
                },
                dragover: function() {
                    e.addClass("div-dropzone-focus")
                },
                dragleave: function() {
                    e.removeClass("div-dropzone-focus")
                },
                drop: function() {
                    e.removeClass("div-dropzone-focus"),
                    e.focus()
                },
                success: function(t, e) {
                    i.appendImageFromUpload([e.url])
                },
                error: function(t, e) {
                    App.alert(e)
                },
                totaluploadprogress: function(t) {},
                sending: function() {},
                queuecomplete: function() {
                    i.restoreUploaderStatus()
                }
            })
        },
        uploadFile: function(t, e) {
            var n, i;
            return i = this,
            n = new FormData,
            n.append("file", t, e),
            $.ajax({
                url: "/photos",
                type: "POST",
                data: n,
                dataType: "JSON",
                processData: !1,
                contentType: !1,
                beforeSend: function() {
                    return i.showUploading()
                },
                success: function(t, e, n) {
                    return i.appendImageFromUpload([n.responseJSON.url]),
                    i.restoreUploaderStatus()
                },
                error: function(t) {
                    return App.alert("\u4e0a\u4f20\u5931\u8d25"),
                    i.restoreUploaderStatus()
                },
                complete: function() {
                    return i.restoreUploaderStatus()
                }
            })
        },
        handlePaste: function(t) {
            var e, n, i;
            return i = this,
            n = t.originalEvent,
            n.clipboardData && n.clipboardData.items && (e = i.isImage(n)) ? (t.preventDefault(), i.uploadFile(e.getAsFile(), "image.png")) : void 0
        },
        isImage: function(t) {
            var e, n;
            for (e = 0; e < t.clipboardData.items.length;) {
                if (n = t.clipboardData.items[e], -1 !== n.type.indexOf("image")) return n;
                e++
            }
            return ! 1
        },
        browseUpload: function(t) {
            return $(".topic-editor").focus(),
            $(".topic-editor-dropzone").click(),
            !1
        },
        showUploading: function() {
            return $("#topic-upload-image").hide(),
            0 === $("#topic-upload-image").parent().find("span.loading").length ? $("#topic-upload-image").before("<span class='loading'><i class='fa fa-circle-o-notch fa-spin'></i></span>") : void 0
        },
        restoreUploaderStatus: function() {
            return $("#topic-upload-image").parent().find("span.loading").remove(),
            $("#topic-upload-image").show()
        },
        appendImageFromUpload: function(t) {
            var e, n, i, r, o, s, a, l;
            for (l = $(".topic-editor"), n = l.caret("pos"), a = "", i = 0, r = t.length; r > i; i++) s = t[i],
            a = "![](" + s + ")\n";
            return o = l.val(),
            e = o.slice(0, n),
            l.val(e + a + o.slice(n + 1, o.count)),
            l.caret("pos", n + a.length),
            l.focus(),
            !1
        },
        reply: function(t) {
            var e, n, i, r, o;
            return e = $(t.target),
            n = e.data("floor"),
            i = e.data("login"),
            o = $("#new_reply textarea"),
            r = n ? "#" + n + "\u697c @" + i + " ": "",
            0 === o.val().trim().length ? r += "": r = "\n" + r,
            o.focus().val(o.val() + r),
            !1
        },
        clickAtFloor: function(t) {
            var e;
            return e = $(t.target).data("floor"),
            this.gotoFloor(e)
        },
        gotoFloor: function(t) {
            var e;
            return e = $("#reply" + t),
            this.highlightReply(e),
            e
        },
        highlightReply: function(t) {
            return $("#replies .reply").removeClass("light"),
            t.addClass("light")
        },
        checkRepliesLikeStatus: function() {
            var t, e, n, i, r, o;
            for (r = Topics.user_liked_reply_ids, o = [], n = 0, i = r.length; i > n; n++) e = r[n],
            t = $("#replies a.likeable[data-id=" + e + "]"),
            o.push(this.parentView.likeableAsLiked(t));
            return o
        },
        replyCallback: function(t, e) {
            return $("#main .alert-message").remove(),
            t ? ($("abbr.timeago", $("#replies .reply").last()).timeago(), $("abbr.timeago", $("#replies .total")).timeago(), $("#new_reply textarea").val(""), $("#preview").text(""), App.notice(e, "#reply")) : App.alert(e, "#reply"),
            $("#new_reply textarea").focus(),
            $("#reply-button").button("reset")
        },
        initContentImageZoom: function() {
            var t, e, n, i, r;
            for (e = ["emoji"], n = $(".markdown img"), i = 0, r = n.length; r > i; i++) t = n[i],
            -1 === e.indexOf($(t).attr("class")) && $(t).wrap("<a href='" + $(t).attr("src") + "' class='zoom-image' data-action='zoom'></a>");
            return App.mobile === !0 ? $("a.zoom-image").attr("target", "_blank") : $("a.zoom-image").fluidbox({
                overlayColor: "#FFF",
                closeTrigger: [{
                    selector: "window",
                    event: "scroll"
                }]
            }),
            !0
        },
        preview: function(t) {
            return $("#preview").text("Loading..."),
            $.post("/topics/preview", {
                body: t
            },
            function(t) {
                return $("#preview").html(t.body)
            },
            "json")
        },
        hookPreview: function(t, e) {
            var n, i;
            return i = this,
            n = $(document.createElement("div")).attr("id", "preview"),
            n.addClass("markdown form-control"),
            $(e).after(n),
            n.hide(),
            $(".edit a", t).click(function() {
                return $(".preview", t).removeClass("active"),
                $(this).parent().addClass("active"),
                $(n).hide(),
                $(e).show(),
                !1
            }),
            $(".preview a", t).click(function() {
                return $(".edit", t).removeClass("active"),
                $(this).parent().addClass("active"),
                $(n).show(),
                $(e).hide(),
                i.preview($(e).val()),
                !1
            })
        },
        initCloseWarning: function() {
            var t, e;
            return e = $("textarea.closewarning"),
            0 === e.length ? !1 : (t || (t = "\u79bb\u5f00\u672c\u9875\u9762\u5c06\u4e22\u5931\u672a\u4fdd\u5b58\u9875\u9762!"), $("input[type=submit]").click(function() {
                return $(window).unbind("beforeunload")
            }), e.change(function() {
                return e.val().length > 0 ? $(window).bind("beforeunload",
                function(e) {
                    return $.browser.msie ? e.returnValue = t: t
                }) : $(window).unbind("beforeunload")
            }))
        },
        bookmark: function(t) {
            var e, n, i;
            return n = $(t.currentTarget),
            i = n.data("id"),
            e = $(".bookmark[data-id='" + i + "']"),
            e.hasClass("active") ? ($.ajax({
                url: "/topics/" + i + "/unfavorite",
                type: "DELETE"
            }), e.attr("title", "\u6536\u85cf").removeClass("active")) : ($.post("/topics/" + i + "/favorite"), e.attr("title", "\u53d6\u6d88\u6536\u85cf").addClass("active")),
            !1
        },
        follow: function(t) {
            var e, n, i;
            return n = $(t.currentTarget),
            i = n.data("id"),
            e = $(".follow[data-id='" + i + "']"),
            e.hasClass("active") ? ($.ajax({
                url: "/topics/" + i + "/unfollow",
                type: "DELETE"
            }), e.removeClass("active")) : ($.ajax({
                url: "/topics/" + i + "/follow",
                type: "POST"
            }), e.addClass("active")),
            !1
        },
        submitTextArea: function(t) {
            return $(t.target).val().trim().length > 0 && $("form#new_reply").submit(),
            !1
        },
        insertSpaces: function(t) {
            var e, n, i, r;
            return r = t.target,
            i = r.selectionStart,
            n = r.selectionEnd,
            e = $(r),
            e.val(e.val().substring(0, i) + "  " + e.val().substring(n)),
            r.selectionStart = r.selectionEnd = i + 2,
            !1
        },
        appendCodesFromHint: function(t) {
            var e, n, i, r, o, s, a, l;
            return r = $(t.currentTarget),
            i = r.data("lang"),
            l = $(".topic-editor"),
            n = l.caret("pos"),
            o = "",
            l.val().length > 0 && (o = "\n"),
            a = o + "```" + i + "\n\n```\n",
            s = l.val(),
            e = s.slice(0, n),
            l.val(e + a + s.slice(n + 1, s.count)),
            l.caret("pos", n + a.length - 5),
            l.focus(),
            l.trigger("click"),
            !1
        },
        scrollPage: function(t) {
            var e, n, i;
            return i = $(t.currentTarget),
            e = i.data("type"),
            n = {
                scrollTop: 0
            },
            "bottom" === e && (n.scrollTop = $("body").height()),
            $("body, html").animate(n, 300),
            !1
        },
        initComponents: function() {
            var t, e, n, i;
            return $("textarea.topic-editor").unbind("keydown.cr"),
            $("textarea.topic-editor").bind("keydown.cr", "ctrl+return",
            function(t) {
                return function(e) {
                    return t.submitTextArea(e)
                }
            } (this)),
            $("textarea.topic-editor").unbind("keydown.mr"),
            $("textarea.topic-editor").bind("keydown.mr", "Meta+return",
            function(t) {
                return function(e) {
                    return t.submitTextArea(e)
                }
            } (this)),
            $("textarea.topic-editor").unbind("keydown.tab"),
            $("textarea.topic-editor").bind("keydown.tab", "tab",
            function(t) {
                return function(e) {
                    return t.insertSpaces(e)
                }
            } (this)),
            $("textarea.topic-editor").autogrow(),
            n = window.location.hash.match(/^#reply(\d+)$/),
            null != n && this.highlightReply($("#reply" + n[1])),
            this.hookPreview($(".editor-toolbar"), $(".topic-editor")),
            $("body").bind("keydown", "m",
            function(t) {
                return $("#markdown_help_tip_modal").modal({
                    keyboard: !0,
                    backdrop: !0,
                    show: !0
                })
            }),
            e = App.scanLogins($("#topic-show .leader a[data-author]")),
            $.extend(e, App.scanLogins($("#replies span.name a"))),
            e = function() {
                var n;
                n = [];
                for (t in e) i = e[t],
                n.push({
                    login: t,
                    name: i,
                    search: t + " " + i
                });
                return n
            } (),
            App.atReplyable("textarea", e),
            $("body[data-controller-name='topics'] #topic_title").focus()
        }
    })
}.call(this),
function() {
    window.PageView = Backbone.View.extend({
        el: "body",
        events: {
            "click .editor-toolbar .edit a": "toggleEditView",
            "click .editor-toolbar .preview a": "togglePreviewView"
        },
        initialize: function(t) {
            return this.parentView = t.parentView,
            $("<div id='preview' class='markdown form-control'></div>").insertAfter($("#page_body"))
        },
        toggleEditView: function(t) {
            return $(t.target).parent().addClass("active"),
            $(".preview a").parent().removeClass("active"),
            $("#preview").hide(),
            $("#page_body").show(),
            !1
        },
        togglePreviewView: function(t) {
            return $(t.target).parent().addClass("active"),
            $(".edit a").parent().removeClass("active"),
            $("#preview").html("Loading..."),
            $("#page_body").hide(),
            $("#preview").show(),
            $.post("/wiki/preview", {
                body: $("#page_body").val()
            },
            function(t) {
                return $("#preview").html(t),
                !1
            }),
            !1
        }
    })
}.call(this),
function() {
    window.NoteView = Backbone.View.extend({
        el: "body",
        events: {
            "click .editor-toolbar .edit a": "toggleEditView",
            "click .editor-toolbar .preview a": "togglePreviewView"
        },
        initialize: function(t) {
            return this.parentView = t.parentView,
            $("<div id='preview' class='markdown' style='display:none;'></div>").insertAfter($("#note_body"))
        },
        toggleEditView: function(t) {
            return $(t.target).parent().addClass("active"),
            $(".preview a").parent().removeClass("active"),
            $("#preview").hide(),
            $("#note_body").show(),
            !1
        },
        togglePreviewView: function(t) {
            return $(t.target).parent().addClass("active"),
            $(".edit a").parent().removeClass("active"),
            $("#preview").html("Loading..."),
            $("#note_body").hide(),
            $("#preview").show(),
            $.post("/notes/preview", {
                body: $("#note_body").val()
            },
            function(t) {
                return $("#preview").html(t),
                !1
            }),
            !1
        }
    })
}.call(this),
function() {
    var t, e, n, i, r, o, s, a, l, u, c, d, h, p, f, m, g, v, y, b, w, x, k, T, E, C, $, _, S, A, N, D, F, L, j, I, O, R, H, P, q, z, M, U, B, W, V, Q, X, G, J, K, Y, Z, tt, et, nt, it, rt, ot, st, at, lt, ut, ct, dt, ht = [].slice,
    pt = [].indexOf ||
    function(t) {
        for (var e = 0,
        n = this.length; n > e; e++) if (e in this && this[e] === t) return e;
        return - 1
    },
    ft = function(t, e) {
        function n() {
            this.constructor = t
        }
        for (var i in e) mt.call(e, i) && (t[i] = e[i]);
        return n.prototype = e.prototype,
        t.prototype = new n,
        t.__super__ = e.prototype,
        t
    },
    mt = {}.hasOwnProperty,
    gt = function(t, e) {
        return function() {
            return t.apply(e, arguments)
        }
    };
    R = {},
    h = 10,
    it = !1,
    Z = !0,
    M = null,
    U = 400,
    y = null,
    L = null,
    W = null,
    dt = null,
    i = {
        BEFORE_CHANGE: "page:before-change",
        FETCH: "page:fetch",
        RECEIVE: "page:receive",
        CHANGE: "page:change",
        UPDATE: "page:update",
        LOAD: "page:load",
        PARTIAL_LOAD: "page:partial-load",
        RESTORE: "page:restore",
        BEFORE_UNLOAD: "page:before-unload",
        AFTER_REMOVE: "page:after-remove"
    },
    T = function(t, e) {
        var i;
        return null == e && (e = {}),
        t = new n(t),
        H(t.absolute) ? void 0 : t.crossOrigin() ? void(document.location.href = t.absolute) : (e.change || e.keep ? J() : d(), G(), null != M && M.start({
            delay: U
        }), it && !e.change && (i = rt(t.absolute)) ? (V(t), E(i), e.showProgressBar = !1, e.scroll = !1) : e.change && !t.hash && null == e.scroll && (e.scroll = !1), C(t, e))
    },
    rt = function(t) {
        var e;
        if (t !== y.url) return e = R[t],
        e && !e.transitionCacheDisabled ? e: void 0
    },
    w = function(t) {
        return null == t && (t = !0),
        it = t
    },
    b = function(t) {
        return null == t && (t = !0),
        Z = !t,
        t
    },
    C = function(t, e) {
        return null == e.cacheRequest && (e.cacheRequest = Z),
        null == e.showProgressBar && (e.showProgressBar = !0),
        ot(i.FETCH, {
            url: t.absolute
        }),
        null != dt && dt.abort(),
        dt = new XMLHttpRequest,
        dt.open("GET", t.formatForXHR({
            cache: e.cacheRequest
        }), !0),
        dt.setRequestHeader("Accept", "text/html, application/xhtml+xml, application/xml"),
        dt.setRequestHeader("X-XHR-Referer", W),
        dt.onload = function() {
            var n, r;
            return ot(i.RECEIVE, {
                url: t.absolute
            }),
            (n = z()) ? (V(t), Q(), r = p.apply(null, ht.call(k(n)).concat([e])), e.showProgressBar && null != M && M.done(), lt(e.scroll), ot(e.change ? i.PARTIAL_LOAD: i.LOAD, r), m(h)) : (null != M && M.done(), document.location.href = v() || t.absolute)
        },
        M && e.showProgressBar && (dt.onprogress = function(t) {
            return function(t) {
                var e;
                return e = t.lengthComputable ? t.loaded / t.total * 100 : M.value + (100 - M.value) / 10,
                M.advanceTo(e)
            }
        } (this)),
        dt.onloadend = function() {
            return dt = null
        },
        dt.onerror = function() {
            return document.location.href = t.absolute
        },
        dt.send()
    },
    E = function(t, e) {
        return null == e && (e = {}),
        null != dt && dt.abort(),
        p(t.title, t.body, null, {
            runScripts: !1
        }),
        null != M && M.done(),
        lt(e.scroll),
        ot(i.RESTORE)
    },
    d = function() {
        var t;
        return t = new n(y.url),
        R[t.absolute] = {
            url: t.relative,
            body: document.body,
            title: document.title,
            positionY: window.pageYOffset,
            positionX: window.pageXOffset,
            cachedAt: (new Date).getTime(),
            transitionCacheDisabled: null != document.querySelector("[data-no-transition-cache]")
        }
    },
    J = function() {
        return delete R[new n(y.url).absolute]
    },
    P = function(t) {
        return null == t && (t = h),
        /^[\d]+$/.test(t) ? h = parseInt(t) : void 0
    },
    m = function(t) {
        var e, n, i, r, o, s;
        for (o = Object.keys(R), e = o.map(function(t) {
            return R[t].cachedAt
        }).sort(function(t, e) {
            return e - t
        }), s = [], n = 0, r = o.length; r > n; n++) i = o[n],
        R[i].cachedAt <= e[t] && (O(R[i].body), s.push(delete R[i]));
        return s
    },
    Y = function(t, e) {
        var n;
        return null == e && (e = {}),
        n = p.apply(null, ht.call(k(g(t))).concat([e])),
        ot(e.change ? i.PARTIAL_LOAD: i.LOAD, n)
    },
    p = function(e, n, r, o) {
        var s, a, l, u, c;
        return e = null != (c = o.title) ? c: e,
        a = document.body,
        o.change ? (l = $(a, "[data-turbolinks-temporary]"), l.push.apply(l, _(a, o.change)), l = K(l)) : l = [a],
        ot(i.BEFORE_UNLOAD, l),
        e !== !1 && (document.title = e),
        o.change ? s = nt(n, l, {
            keep: !1
        }) : (o.flush || (u = $(a, "[data-turbolinks-permanent]"), o.keep && u.push.apply(u, _(a, o.keep)), nt(n, K(u), {
            keep: !0
        })), document.body = n, null != r && t.update(r), et(), s = [n]),
        x(S(s, o.runScripts)),
        y = window.history.state,
        ot(i.CHANGE, s),
        ot(i.UPDATE),
        s
    },
    $ = function(t, e) {
        return Array.prototype.slice.apply(t.querySelectorAll(e))
    },
    _ = function(t, e) {
        var n, i, r, o, s;
        for (o = [], s = Array.isArray(e) ? e: [e], n = 0, r = s.length; r > n; n++) i = s[n],
        o.push.apply(o, $(t, '[id^="' + i + ':"], [id="' + i + '"]'));
        return o
    },
    nt = function(t, e, n) {
        var i, r, o, s, a, l;
        for (i = [], o = 0, s = e.length; s > o; o++) {
            if (r = e[o], !(a = r.getAttribute("id"))) throw new Error("Turbolinks partial replace: turbolinks elements must have an id."); (l = t.querySelector('[id="' + a + '"]')) && (n.keep ? (r.parentNode.insertBefore(r.cloneNode(!0), r), r = l.ownerDocument.adoptNode(r), l.parentNode.replaceChild(r, l)) : (r.parentNode.replaceChild(l, r), O(r), i.push(l)))
        }
        return i
    },
    O = function(t) {
        return "undefined" != typeof jQuery && jQuery(t).remove(),
        ot(i.AFTER_REMOVE, t)
    },
    S = function(t, e) {
        var n, i, r, o, s, a;
        for (a = e === !1 ? 'script[data-turbolinks-eval="always"]': 'script:not([data-turbolinks-eval="false"])', r = document.body.querySelectorAll(a), o = [], n = 0, i = r.length; i > n; n++) s = r[n],
        (F(s) || j(t, s) && !ct(s)) && o.push(s);
        return o
    },
    F = function(t) {
        return "always" === t.getAttribute("data-turbolinks-eval")
    },
    ct = function(t) {
        for (; null != t;) {
            if ("function" == typeof t.hasAttribute ? t.hasAttribute("data-turbolinks-permanent") : void 0) return ! 0;
            t = t.parentNode
        }
        return ! 1
    },
    j = function(t, e) {
        for (; null != e;) {
            if (pt.call(t, e) >= 0) return ! 0;
            e = e.parentNode
        }
        return ! 1
    },
    x = function(t) {
        var e, n, i, r, o, s, a, l, u, c, d;
        for (i = 0, o = t.length; o > i; i++) if (d = t[i], "" === (u = d.type) || "text/javascript" === u) {
            for (n = document.createElement("script"), c = d.attributes, r = 0, s = c.length; s > r; r++) e = c[r],
            n.setAttribute(e.name, e.value);
            d.hasAttribute("async") || (n.async = !1),
            n.appendChild(document.createTextNode(d.innerHTML)),
            l = d.parentNode,
            a = d.nextSibling,
            l.removeChild(d),
            l.insertBefore(n, a)
        }
    },
    et = function() {
        var t, e;
        return t = (e = document.querySelectorAll("input[autofocus], textarea[autofocus]"))[e.length - 1],
        t && document.activeElement !== t ? t.focus() : void 0
    },
    V = function(t) {
        var e;
        return (e = (t = new n(t)).absolute) !== W && e !== document.location.href ? window.history.pushState({
            turbolinks: !0,
            url: t.absolute
        },
        "", t.absolute) : void 0
    },
    Q = function() {
        var t, e;
        return (t = dt.getResponseHeader("X-XHR-Redirected-To")) ? (t = new n(t), e = t.hasNoHash() ? document.location.hash: "", window.history.replaceState(window.history.state, "", t.href + e)) : void 0
    },
    v = function() {
        var t;
        return null != (t = dt.getResponseHeader("Location")) && new n(t).crossOrigin() ? t: void 0
    },
    G = function() {
        return W = document.location.href
    },
    X = function() {
        return window.history.replaceState({
            turbolinks: !0,
            url: document.location.href
        },
        "", document.location.href),
        y = window.history.state
    },
    lt = function(t) {
        return Array.isArray(t) ? window.scrollTo(t[0], t[1]) : t !== !1 ? document.location.hash ? (document.location.href = document.location.href, X()) : window.scrollTo(0, 0) : void 0
    },
    f = function(t) {
        var e, n, i;
        if (null == t || "object" != typeof t) return t;
        e = new t.constructor;
        for (n in t) i = t[n],
        e[n] = f(i);
        return e
    },
    K = function(t) {
        var e, n, i, r;
        for (r = [], e = 0, n = t.length; n > e; e++) i = t[e],
        -1 === r.indexOf(i) && r.push(i);
        return r
    },
    q = function(t) {
        var e, n;
        return n = (null != (e = document.cookie.match(new RegExp(t + "=(\\w+)"))) ? e[1].toUpperCase() : void 0) || "",
        document.cookie = t + "=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/",
        n
    },
    at = function() {
        return (new Date).getTime().toString(36)
    },
    ot = function(t, e) {
        var n;
        return "undefined" != typeof Prototype && Event.fire(document, t, e, !0),
        n = document.createEvent("Events"),
        e && (n.data = e),
        n.initEvent(t, !0, !0),
        document.dispatchEvent(n)
    },
    H = function(t) {
        return ! ot(i.BEFORE_CHANGE, {
            url: t
        })
    },
    z = function() {
        var t, e, n, i, r, o, s;
        return e = function() {
            var t;
            return 400 <= (t = dt.status) && 600 > t
        },
        s = function() {
            var t;
            return null != (t = dt.getResponseHeader("Content-Type")) && t.match(/^(?:text\/html|application\/xhtml\+xml|application\/xml)(?:;|$)/)
        },
        i = function() {
            var t;
            return null != (t = dt.getResponseHeader("Content-Disposition")) && t.match(/^attachment/)
        },
        r = function(t) {
            var e, n, i, r, o;
            for (r = t.querySelector("head").childNodes, o = [], e = 0, n = r.length; n > e; e++) i = r[e],
            null != ("function" == typeof i.getAttribute ? i.getAttribute("data-turbolinks-track") : void 0) && o.push(i.getAttribute("src") || i.getAttribute("href"));
            return o
        },
        t = function(t) {
            var e;
            return L || (L = r(document)),
            e = r(t),
            e.length !== L.length || o(e, L).length !== L.length
        },
        o = function(t, e) {
            var n, i, r, o, s;
            for (t.length > e.length && (r = [e, t], t = r[0], e = r[1]), o = [], n = 0, i = t.length; i > n; n++) s = t[n],
            pt.call(e, s) >= 0 && o.push(s);
            return o
        },
        e() || !s() || i() || (n = g(dt.responseText), !n || t(n)) ? void 0 : n
    },
    k = function(e) {
        var n;
        return n = e.querySelector("title"),
        [null != n ? n.textContent: void 0, e.querySelector("body"), t.get(e).token]
    },
    t = {
        get: function(t) {
            var e;
            return null == t && (t = document),
            {
                node: e = t.querySelector('meta[name="csrf-token"]'),
                token: null != e && "function" == typeof e.getAttribute ? e.getAttribute("content") : void 0
            }
        },
        update: function(t) {
            var e;
            return e = this.get(),
            null != e.token && null != t && e.token !== t ? e.node.setAttribute("content", t) : void 0
        }
    },
    g = function(t) {
        var e;
        return /<(html|body)/i.test(t) ? (e = document.documentElement.cloneNode(), e.innerHTML = t) : (e = document.documentElement.cloneNode(!0), e.querySelector("body").innerHTML = t),
        e.head = e.querySelector("head"),
        e.body = e.querySelector("body"),
        e
    },
    n = function() {
        function t(e) {
            return this.original = null != e ? e: document.location.href,
            this.original.constructor === t ? this.original: void this._parse()
        }
        return t.prototype.withoutHash = function() {
            return this.href.replace(this.hash, "").replace("#", "")
        },
        t.prototype.withoutHashForIE10compatibility = function() {
            return this.withoutHash()
        },
        t.prototype.hasNoHash = function() {
            return 0 === this.hash.length
        },
        t.prototype.crossOrigin = function() {
            return this.origin !== (new t).origin
        },
        t.prototype.formatForXHR = function(t) {
            return null == t && (t = {}),
            (t.cache ? this: this.withAntiCacheParam()).withoutHashForIE10compatibility()
        },
        t.prototype.withAntiCacheParam = function() {
            return new t(/([?&])_=[^&]*/.test(this.absolute) ? this.absolute.replace(/([?&])_=[^&]*/, "$1_=" + at()) : new t(this.absolute + (/\?/.test(this.absolute) ? "&": "?") + ("_=" + at())))
        },
        t.prototype._parse = function() {
            var t;
            return (null != this.link ? this.link: this.link = document.createElement("a")).href = this.original,
            t = this.link,
            this.href = t.href,
            this.protocol = t.protocol,
            this.host = t.host,
            this.hostname = t.hostname,
            this.port = t.port,
            this.pathname = t.pathname,
            this.search = t.search,
            this.hash = t.hash,
            this.origin = [this.protocol, "//", this.hostname].join(""),
            0 !== this.port.length && (this.origin += ":" + this.port),
            this.relative = [this.pathname, this.search, this.hash].join(""),
            this.absolute = this.href
        },
        t
    } (),
    r = function(t) {
        function e(t) {
            return this.link = t,
            this.link.constructor === e ? this.link: (this.original = this.link.href, this.originalElement = this.link, this.link = this.link.cloneNode(!1), void e.__super__.constructor.apply(this, arguments))
        }
        return ft(e, t),
        e.HTML_EXTENSIONS = ["html"],
        e.allowExtensions = function() {
            var t, n, i, r;
            for (n = 1 <= arguments.length ? ht.call(arguments, 0) : [], i = 0, r = n.length; r > i; i++) t = n[i],
            e.HTML_EXTENSIONS.push(t);
            return e.HTML_EXTENSIONS
        },
        e.prototype.shouldIgnore = function() {
            return this.crossOrigin() || this._anchored() || this._nonHtml() || this._optOut() || this._target()
        },
        e.prototype._anchored = function() {
            return (this.hash.length > 0 || "#" === this.href.charAt(this.href.length - 1)) && this.withoutHash() === (new n).withoutHash()
        },
        e.prototype._nonHtml = function() {
            return this.pathname.match(/\.[a-z]+$/g) && !this.pathname.match(new RegExp("\\.(?:" + e.HTML_EXTENSIONS.join("|") + ")?$", "g"))
        },
        e.prototype._optOut = function() {
            var t, e;
            for (e = this.originalElement; ! t && e !== document;) t = null != e.getAttribute("data-no-turbolink"),
            e = e.parentNode;
            return t
        },
        e.prototype._target = function() {
            return 0 !== this.link.target.length
        },
        e
    } (n),
    e = function() {
        function t(t) {
            this.event = t,
            this.event.defaultPrevented || (this._extractLink(), this._validForTurbolinks() && (ut(this.link.href), this.event.preventDefault()))
        }
        return t.installHandlerLast = function(e) {
            return e.defaultPrevented ? void 0 : (document.removeEventListener("click", t.handle, !1), document.addEventListener("click", t.handle, !1))
        },
        t.handle = function(e) {
            return new t(e)
        },
        t.prototype._extractLink = function() {
            var t;
            for (t = this.event.target; t.parentNode && "A" !== t.nodeName;) t = t.parentNode;
            return "A" === t.nodeName && 0 !== t.href.length ? this.link = new r(t) : void 0
        },
        t.prototype._validForTurbolinks = function() {
            return null != this.link && !(this.link.shouldIgnore() || this._nonStandardClick())
        },
        t.prototype._nonStandardClick = function() {
            return this.event.which > 1 || this.event.metaKey || this.event.ctrlKey || this.event.shiftKey || this.event.altKey
        },
        t
    } (),
    o = function() {
        function t(t) {
            this.elementSelector = t,
            this._trickle = gt(this._trickle, this),
            this._reset = gt(this._reset, this),
            this.value = 0,
            this.content = "",
            this.speed = 300,
            this.opacity = n,
            this.install()
        }
        var e, n;
        return e = "turbolinks-progress-bar",
        n = .99,
        t.enable = function() {
            return null != M ? M: M = new t("html")
        },
        t.disable = function() {
            return null != M && M.uninstall(),
            M = null
        },
        t.prototype.install = function() {
            return this.element = document.querySelector(this.elementSelector),
            this.element.classList.add(e),
            this.styleElement = document.createElement("style"),
            document.head.appendChild(this.styleElement),
            this._updateStyle()
        },
        t.prototype.uninstall = function() {
            return this.element.classList.remove(e),
            document.head.removeChild(this.styleElement)
        },
        t.prototype.start = function(t) {
            var e;
            return e = (null != t ? t: {}).delay,
            clearTimeout(this.displayTimeout),
            e ? (this.display = !1, this.displayTimeout = setTimeout(function(t) {
                return function() {
                    return t.display = !0
                }
            } (this), e)) : this.display = !0,
            this.value > 0 && (this._reset(), this._reflow()),
            this.advanceTo(5)
        },
        t.prototype.advanceTo = function(t) {
            var e;
            if (t > (e = this.value) && 100 >= e) {
                if (this.value = t, this._updateStyle(), 100 === this.value) return this._stopTrickle();
                if (this.value > 0) return this._startTrickle()
            }
        },
        t.prototype.done = function() {
            return this.value > 0 ? (this.advanceTo(100), this._finish()) : void 0
        },
        t.prototype._finish = function() {
            return this.fadeTimer = setTimeout(function(t) {
                return function() {
                    return t.opacity = 0,
                    t._updateStyle()
                }
            } (this), this.speed / 2),
            this.resetTimer = setTimeout(this._reset, this.speed)
        },
        t.prototype._reflow = function() {
            return this.element.offsetHeight
        },
        t.prototype._reset = function() {
            return this._stopTimers(),
            this.value = 0,
            this.opacity = n,
            this._withSpeed(0,
            function(t) {
                return function() {
                    return t._updateStyle(!0)
                }
            } (this))
        },
        t.prototype._stopTimers = function() {
            return this._stopTrickle(),
            clearTimeout(this.fadeTimer),
            clearTimeout(this.resetTimer)
        },
        t.prototype._startTrickle = function() {
            return this.trickleTimer ? void 0 : this.trickleTimer = setTimeout(this._trickle, this.speed)
        },
        t.prototype._stopTrickle = function() {
            return clearTimeout(this.trickleTimer),
            delete this.trickleTimer
        },
        t.prototype._trickle = function() {
            return this.advanceTo(this.value + Math.random() / 2),
            this.trickleTimer = setTimeout(this._trickle, this.speed)
        },
        t.prototype._withSpeed = function(t, e) {
            var n, i;
            return n = this.speed,
            this.speed = t,
            i = e(),
            this.speed = n,
            i
        },
        t.prototype._updateStyle = function(t) {
            return null == t && (t = !1),
            t && this._changeContentToForceRepaint(),
            this.styleElement.textContent = this._createCSSRule()
        },
        t.prototype._changeContentToForceRepaint = function() {
            return this.content = "" === this.content ? " ": ""
        },
        t.prototype._createCSSRule = function() {
            return this.elementSelector + "." + e + "::before {\n  content: '" + this.content + "';\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: 2000;\n  background-color: #0076ff;\n  height: 3px;\n  opacity: " + this.opacity + ";\n  width: " + (this.display ? this.value: 0) + "%;\n  transition: width " + this.speed + "ms ease-out, opacity " + this.speed / 2 + "ms ease-in;\n  transform: translate3d(0,0,0);\n}"
        },
        t
    } (),
    s = {
        enable: o.enable,
        disable: o.disable,
        setDelay: function(t) {
            return U = t
        },
        start: function(t) {
            return o.enable().start(t)
        },
        advanceTo: function(t) {
            return null != M ? M.advanceTo(t) : void 0
        },
        done: function() {
            return null != M ? M.done() : void 0
        }
    },
    N = function() {
        return document.addEventListener("DOMContentLoaded",
        function() {
            return ot(i.CHANGE, [document.body]),
            ot(i.UPDATE)
        },
        !0)
    },
    D = function() {
        return "undefined" != typeof jQuery ? jQuery(document).on("ajaxSuccess",
        function(t, e, n) {
            return jQuery.trim(e.responseText) ? ot(i.UPDATE) : void 0
        }) : void 0
    },
    I = function(t) {
        var e, i, r, o;
        return (null != (o = t.state) ? o.turbolinks: void 0) && t.state.url !== y.url ? (r = new n(y.url), i = new n(t.state.url), i.withoutHash() === r.withoutHash() ? lt() : (e = R[i.absolute]) ? (d(), E(e, {
            scroll: [e.positionX, e.positionY]
        })) : ut(t.target.location.href)) : void 0
    },
    A = function() {
        return X(),
        o.enable(),
        document.addEventListener("click", e.installHandlerLast, !0),
        window.addEventListener("hashchange", X, !1),
        window.addEventListener("popstate", I, !1)
    },
    u = window.history && "pushState" in window.history && "state" in window.history,
    st = navigator.userAgent,
    a = ( - 1 !== st.indexOf("Android 2.") || -1 !== st.indexOf("Android 4.0")) && -1 !== st.indexOf("Mobile Safari") && -1 === st.indexOf("Chrome") && -1 === st.indexOf("Windows Phone"),
    tt = "GET" === (B = q("request_method")) || "" === B,
    c = u && !a && tt,
    l = document.addEventListener && document.createEvent,
    l && (N(), D()),
    c ? (ut = T, A()) : ut = function(t) {
        return null == t && (t = document.location.href),
        document.location.href = t
    },
    this.Turbolinks = {
        visit: ut,
        replace: Y,
        pagesCached: P,
        cacheCurrentPage: d,
        enableTransitionCache: w,
        disableRequestCaching: b,
        ProgressBar: s,
        allowLinkExtensions: r.allowExtensions,
        supported: c,
        EVENTS: f(i)
    }
}.call(this),
function(t, e, n, i, r, o, s) {
    t.GoogleAnalyticsObject = r,
    t[r] = t[r] ||
    function() { (t[r].q = t[r].q || []).push(arguments)
    },
    t[r].l = 1 * new Date,
    o = e.createElement(n),
    s = e.getElementsByTagName(n)[0],
    o.async = 1,
    o.src = i,
    s.parentNode.insertBefore(o, s)
} (window, document, "script", "//www.google-analytics.com/analytics.js", "ga"),
function() {
    var t;
    t = Backbone.View.extend({
        el: "body",
        repliesPerPage: 50,
        events: {
            "click a.likeable": "likeable",
            "click .header .form-search .btn-search": "openHeaderSearchBox",
            "click .header .form-search .btn-close": "closeHeaderSearchBox",
            "click a.button-block-user": "blockUser",
            "click a.button-follow-user": "followUser",
            "click a.button-block-node": "blockNode",
            "click a.rucaptcha-image-box": "reLoadRucaptchaImage"
        },
        initialize: function() {
            var t, e, n;
            return FormStorage.restore(),
            Turbolinks.ProgressBar.enable(),
            this.initForDesktopView(),
            this.initComponents(),
            this.initNotificationSubscribe(),
            ("topics" === (t = $("body").data("controller-name")) || "replies" === t) && (window._topicView = new TopicView({
                parentView: this
            })),
            "pages" === (e = $("body").data("controller-name")) && (window._pageView = new PageView({
                parentView: this
            })),
            "notes" === (n = $("body").data("controller-name")) ? window._noteView = new NoteView({
                parentView: this
            }) : void 0
        },
        initComponents: function() {
            return $("abbr.timeago").timeago(),
            $(".alert").alert(),
            $(".dropdown-toggle").dropdown(),
            $(".bootstrap-select").remove(),
            $("select").selectpicker(),
            $(".cell_comments_new textarea").unbind("keydown"),
            $(".cell_comments_new textarea").bind("keydown", "ctrl+return",
            function(t) {
                return $(t.target).val().trim().length > 0 && $(t.target).parent().parent().submit(),
                !1
            })
        },
        initForDesktopView: function() {
            var t, e, n;
            if ("undefined" == typeof app_mobile) return $("a[rel=twipsy]").tooltip(),
            t = App.scanLogins($(".cell_comments .comment .info .name a")),
            t = function() {
                var i;
                i = [];
                for (e in t) n = t[e],
                i.push({
                    login: e,
                    name: n,
                    search: e + " " + n
                });
                return i
            } (),
            App.atReplyable(".cell_comments_new textarea", t)
        },
        likeable: function(t) {
            var e, n, i, r, o;
            return App.isLogined() ? (n = $(t.currentTarget), r = n.data("type"), i = n.data("id"), o = parseInt(n.data("count")), e = $(".likeable[data-type='" + r + "'][data-id='" + i + "']"), "active" !== e.data("state") ? ($.ajax({
                url: "/likes",
                type: "POST",
                data: {
                    type: r,
                    id: i
                }
            }), o += 1, e.data("count", o), this.likeableAsLiked(e)) : ($.ajax({
                url: "/likes/" + i,
                type: "DELETE",
                data: {
                    type: r
                }
            }), o > 0 && (o -= 1), e.data("state", "").data("count", o).attr("title", "").removeClass("active"), 0 === o ? $("span", e).text("") : $("span", e).text(o + " \u4e2a\u8d5e"), $("i.fa", e).attr("class", "fa fa-thumbs-up")), !1) : (location.href = "/account/sign_in", !1)
        },
        likeableAsLiked: function(t) {
            var e;
            return e = t.data("count"),
            t.data("state", "active").attr("title", "\u53d6\u6d88\u8d5e").addClass("active"),
            $("span", t).text(e + " \u4e2a\u8d5e"),
            $("i.fa", t).attr("class", "fa fa-thumbs-up")
        },
        initNotificationSubscribe: function() {
            return null == App.access_token || App.access_token.length < 5 ? void 0 : (MessageBus.start(), MessageBus.callbackInterval = 1e3, MessageBus.subscribe("/notifications_count/" + App.access_token,
            function(t) {
                var e, n, i, r;
                return i = $(".notification-count span"),
                e = $(".notification-count a"),
                n = document.title.replace(/^\(\d+\) /, ""),
                t.count > 0 ? (i.show(), n = "(" + t.count + ") " + n, r = App.fixUrlDash("" + App.root_url + t.content_path), $.notifier.notify("", t.title, t.content, r), e.addClass("new")) : (i.hide(), e.removeClass("new")),
                i.text(t.count),
                document.title = n
            }), !0)
        },
        openHeaderSearchBox: function(t) {
            return $(".header .form-search").addClass("active"),
            $(".header .form-search input").focus(),
            !1
        },
        closeHeaderSearchBox: function(t) {
            return $(".header .form-search input").val(""),
            $(".header .form-search").removeClass("active"),
            !1
        },
        followUser: function(t) {
            var e, n, i, r;
            return e = $(t.currentTarget),
            r = e.data("id"),
            i = e.find("span"),
            n = $(".follow-info .followers[data-login=" + r + "] .counter"),
            e.hasClass("active") ? $.ajax({
                url: "/" + r + "/unfollow",
                type: "POST",
                success: function(t) {
                    return 0 === t.code ? (e.removeClass("active"), i.text("\u5173\u6ce8"), n.text(t.data.followers_count)) : void 0
                }
            }) : $.ajax({
                url: "/" + r + "/follow",
                type: "POST",
                success: function(t) {
                    return 0 === t.code ? (e.addClass("active").attr("title", ""), i.text("\u53d6\u6d88\u5173\u6ce8"), n.text(t.data.followers_count)) : void 0
                }
            }),
            !1
        },
        blockUser: function(t) {
            var e, n, i;
            return e = $(t.currentTarget),
            i = e.data("id"),
            n = e.find("span"),
            e.hasClass("active") ? ($.post("/" + i + "/unblock"), e.removeClass("active").attr("title", "\u5ffd\u7565\u540e\uff0c\u793e\u533a\u9996\u9875\u5217\u8868\u5c06\u4e0d\u4f1a\u663e\u793a\u6b64\u7528\u6237\u53d1\u5e03\u7684\u5185\u5bb9\u3002"), n.text("\u5c4f\u853d")) : ($.post("/" + i + "/block"), e.addClass("active").attr("title", ""), n.text("\u53d6\u6d88\u5c4f\u853d")),
            !1
        },
        blockNode: function(t) {
            var e, n, i;
            return e = $(t.currentTarget),
            n = e.data("id"),
            i = e.find("span"),
            e.hasClass("active") ? ($.post("/nodes/" + n + "/unblock"), e.removeClass("active").attr("title", "\u5ffd\u7565\u540e\uff0c\u793e\u533a\u9996\u9875\u5217\u8868\u5c06\u4e0d\u4f1a\u663e\u793a\u8fd9\u91cc\u7684\u5185\u5bb9\u3002"), i.text("\u5ffd\u7565\u8282\u70b9")) : ($.post("/nodes/" + n + "/block"), e.addClass("active").attr("title", ""), i.text("\u53d6\u6d88\u5c4f\u853d")),
            !1
        },
        reLoadRucaptchaImage: function(t) {
            var e, n, i;
            return e = $(t.currentTarget),
            i = e.find("img:first"),
            n = i.attr("src"),
            i.attr("src", n.split("?")[0] + "?" + (new Date).getTime()),
            !1
        }
    }),
    window.App = {
        locale: "zh-CN",
        notifier: null,
        current_user_id: null,
        access_token: "",
        asset_url: "",
        root_url: "",
        isLogined: function() {
            return null !== App.current_user_id
        },
        loading: function() {
            return console.log("loading...")
        },
        fixUrlDash: function(t) {
            return t.replace(/\/\//g, "/").replace(/:\//, "://")
        },
        alert: function(t, e) {
            return $(".alert").remove(),
            $(e).before("<div class='alert alert-warning'><a class='close' href='#' data-dismiss='alert'>X</a>" + t + "</div>")
        },
        notice: function(t, e) {
            return $(".alert").remove(),
            $(e).before("<div class='alert alert-success'><a class='close' data-dismiss='alert' href='#'>X</a>" + t + "</div>")
        },
        openUrl: function(t) {
            return window.open(t)
        },
        gotoUrl: function(t) {
            return Turbolinks.visit(t)
        },
        scanLogins: function(t) {
            var e, n, i, r, o;
            for (o = {},
            i = 0, r = t.length; r > i; i++) n = t[i],
            e = $(n),
            o[e.text()] = e.attr("data-name");
            return o
        },
        atReplyable: function(t, e) {
            return 0 !== e.length ? ($(t).atwho({
                at: "@",
                data: e,
                search_key: "search",
                tpl: "<li data-value='${login}'>${login} <small>${name}</small></li>"
            }).atwho({
                at: ":",
                data: window.EMOJI_LIST,
                tpl: "<li data-value='${name}:'><img src='" + App.asset_url + "/assets/emojis/${name}.png' height='20' width='20'/> ${name} </li>"
            }), !0) : void 0
        }
    },
    $(document).on("page:change",
    function() {
        return window._appView = new t
    }),
    FormStorage.init()
}.call(this);